Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
a0682ed9
Commit
a0682ed9
authored
Sep 28, 2017
by
Leopoldthecoder
Committed by
Black Wayne
Sep 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update release & deploy scripts
parent
b5786701
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
34 deletions
+21
-34
build/bin/version.js
build/bin/version.js
+2
-2
build/deploy-ci.sh
build/deploy-ci.sh
+13
-10
build/git-release.sh
build/git-release.sh
+1
-1
build/release.sh
build/release.sh
+5
-21
No files found.
build/bin/version.js
View file @
a0682ed9
var
fs
=
require
(
'
fs
'
);
var
path
=
require
(
'
path
'
);
var
version
=
process
.
env
.
VERSION
||
require
(
'
../../package.json
'
).
version
;
var
content
=
{
'
1.0.9
'
:
'
1.0
'
,
'
1.1.6
'
:
'
1.1
'
,
'
1.2.9
'
:
'
1.2
'
,
'
1.3.7
'
:
'
1.3
'
};
if
(
!
content
[
version
])
content
[
version
]
=
'
1.4
'
;
var
content
=
{
'
1.0.9
'
:
'
1.0
'
,
'
1.1.6
'
:
'
1.1
'
,
'
1.2.9
'
:
'
1.2
'
,
'
1.3.7
'
:
'
1.3
'
,
'
1.4.6
'
:
'
1.4
'
};
if
(
!
content
[
version
])
content
[
version
]
=
'
2.0
'
;
fs
.
writeFileSync
(
path
.
resolve
(
__dirname
,
'
../../examples/versions.json
'
),
JSON
.
stringify
(
content
));
build/deploy-ci.sh
View file @
a0682ed9
...
...
@@ -8,6 +8,9 @@ if [ "$ROT_TOKEN" = "" ]; then
exit
0
fi
SUB_FOLDER
=
$(
echo
"2.0.0-alpha.1"
|
grep
-o
-E
"
\d
+
\.\d
+"
)
echo
$SUB_FOLDER
# release
if
[
"
$TRAVIS_TAG
"
]
;
then
# build lib
...
...
@@ -22,11 +25,11 @@ if [ "$TRAVIS_TAG" ]; then
git push origin master
--tags
cd
../..
# build theme-
default
# build theme-
chalk
cd
temp_web
git clone https://
$ROT_TOKEN
@github.com/ElementUI/theme-
default.git
&&
cd
theme-default
git clone https://
$ROT_TOKEN
@github.com/ElementUI/theme-
chalk.git
&&
cd
theme-chalk
rm
-rf
*
cp
-rf
../../packages/theme-
default
/
**
.
cp
-rf
../../packages/theme-
chalk
/
**
.
git add
-A
.
git commit
-m
"[build]
$TRAVIS_TAG
"
git tag
$TRAVIS_TAG
...
...
@@ -39,14 +42,14 @@ if [ "$TRAVIS_TAG" ]; then
git clone
-b
gh-pages https://
$ROT_TOKEN
@github.com/ElemeFE/element.git
&&
cd
element
# build sub folder
echo
$TRAVIS_TAG
export
SUB_FOLDER
=
$(
echo
"
$TRAVIS_TAG
"
|
grep
-o
-E
"
\d
+
\.\d
+"
)
SUB_FOLDER
=
$(
echo
"
$TRAVIS_TAG
"
|
grep
-o
-E
"
\d
+
\.\d
+"
)
echo
$SUB_FOLDER
SUB_FOLDER
=
'
1.4
'
SUB_FOLDER
=
'
2.0
'
mkdir
$SUB_FOLDER
rm
-rf
*
.js
*
.css
*
.map static
#
rm -rf *.js *.css *.map static
rm
-rf
$SUB_FOLDER
/
**
cp
-rf
../../examples/element-ui/
**
.
#
cp -rf ../../examples/element-ui/** .
cp
-rf
../../examples/element-ui/
**
$SUB_FOLDER
/
git add
-A
.
git commit
-m
"
$TRAVIS_COMMIT_MSG
"
...
...
@@ -69,11 +72,11 @@ git commit -m "$TRAVIS_COMMIT_MSG"
git push origin master
cd
../..
# push dev theme-
default
# push dev theme-
chalk
cd
temp_web
git clone
-b
$TRAVIS_BRANCH
https://
$ROT_TOKEN
@github.com/ElementUI/theme-
default.git
&&
cd
theme-default
git clone
-b
$TRAVIS_BRANCH
https://
$ROT_TOKEN
@github.com/ElementUI/theme-
chalk.git
&&
cd
theme-chalk
rm
-rf
*
cp
-rf
../../packages/theme-
default
/
**
.
cp
-rf
../../packages/theme-
chalk
/
**
.
git add
-A
.
git commit
-m
"
$TRAVIS_COMMIT_MSG
"
git push origin
$TRAVIS_BRANCH
...
...
build/git-release.sh
View file @
a0682ed9
#!/usr/bin/env sh
git checkout
dev
git checkout
carbon
if
test
-n
"
$(
git status
--porcelain
)
"
;
then
echo
'Unclean working tree. Commit or stash changes first.'
>
&2
;
...
...
build/release.sh
View file @
a0682ed9
git checkout master
git merge dev
#!/usr/bin/env sh
set
-e
echo
"Enter release version: "
...
...
@@ -16,15 +13,10 @@ then
VERSION
=
$VERSION
npm run dist
# publish theme
echo
"Releasing theme-
default
$VERSION
..."
cd
packages/theme-
default
echo
"Releasing theme-
chalk
$VERSION
..."
cd
packages/theme-
chalk
npm version
$VERSION
--message
"[release]
$VERSION
"
if
[[
$VERSION
=
~
"beta"
]]
then
npm publish
--tag
beta
else
npm publish
fi
npm publish
--tag
next
cd
../..
# commit
...
...
@@ -33,16 +25,8 @@ then
npm version
$VERSION
--message
"[release]
$VERSION
"
# publish
git push eleme
master
git push eleme
carbon
git push eleme refs/tags/v
$VERSION
git checkout dev
git rebase master
git push eleme dev
if
[[
$VERSION
=
~
"beta"
]]
then
npm publish
--tag
beta
else
npm publish
fi
npm publish
--tag
next
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment