-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathbuild.sh
executable file
·62 lines (47 loc) · 2.85 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env bash
LOG=`git log --pretty=oneline --abbrev-commit -1`
rm -rf .subsplit
case "$LOG" in
*MAJOR@*) echo "Major Version"; VERSION_TYPE="MAJOR";;
*MINOR@*) echo "Minor version"; VERSION_TYPE="MINOR";;
*PATCH@*) echo "Patch Version"; VERSION_TYPE="PATCH";;
esac
if [ $VERSION_TYPE ]
then
git checkout master
git pull origin master
case "$VERSION_TYPE" in
*MAJOR*) VERSION=$(npm version major --force);;
*MINOR*) VERSION=$(npm version minor --force);;
*PATCH*) VERSION=$(npm version patch --force);;
esac
VERSION=$(echo $VERSION | cut -c 2-)
echo "VERSION : " $VERSION
echo "START VERSION UP PROCESS"
npm install && gulp version
git add *
echo "Git Commit & Push"
git commit -m "$VERSION RELEASED" && git pull origin master && git push origin master
fi
echo "Start git Subsplit"
git subsplit init [email protected]:ax5ui/ax5ui-kernel.git
git subsplit publish --heads="master" --no-tags src/ax5core:[email protected]:ax5ui/ax5core.git
git subsplit publish --heads="master" --no-tags src/ax5ui-docker:[email protected]:ax5ui/ax5ui-docker.git
git subsplit publish --heads="master" --no-tags src/ax5ui-uploader:[email protected]:ax5ui/ax5ui-uploader.git
git subsplit publish --heads="master" --no-tags src/ax5ui-grid:[email protected]:ax5ui/ax5ui-grid.git
git subsplit publish --heads="master" --no-tags src/ax5ui-dialog:[email protected]:ax5ui/ax5ui-dialog.git
git subsplit publish --heads="master" --no-tags src/ax5ui-toast:[email protected]:ax5ui/ax5ui-toast.git
git subsplit publish --heads="master" --no-tags src/ax5ui-modal:[email protected]:ax5ui/ax5ui-modal.git
git subsplit publish --heads="master" --no-tags src/ax5ui-calendar:[email protected]:ax5ui/ax5ui-calendar.git
git subsplit publish --heads="master" --no-tags src/ax5ui-picker:[email protected]:ax5ui/ax5ui-picker.git
git subsplit publish --heads="master" --no-tags src/ax5ui-formatter:[email protected]:ax5ui/ax5ui-formatter.git
git subsplit publish --heads="master" --no-tags src/ax5ui-menu:[email protected]:ax5ui/ax5ui-menu.git
git subsplit publish --heads="master" --no-tags src/ax5ui-select:[email protected]:ax5ui/ax5ui-select.git
git subsplit publish --heads="master" --no-tags src/ax5ui-media-viewer:[email protected]:ax5ui/ax5ui-media-viewer.git
git subsplit publish --heads="master" --no-tags src/ax5ui-combobox:[email protected]:ax5ui/ax5ui-combobox.git
git subsplit publish --heads="master" --no-tags src/ax5ui-layout:[email protected]:ax5ui/ax5ui-layout.git
git subsplit publish --heads="master" --no-tags src/ax5ui-binder:[email protected]:ax5ui/ax5ui-binder.git
git subsplit publish --heads="master" --no-tags src/ax5ui-autocomplete:[email protected]:ax5ui/ax5ui-autocomplete.git
git subsplit publish --heads="master" --no-tags src/ax5ui-mask:[email protected]:ax5ui/ax5ui-mask.git
git subsplit publish --heads="master" --no-tags src/ax5ui-palette:[email protected]:ax5ui/ax5ui-palette.git
rm -rf .subsplit/