-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsync.sh
53 lines (45 loc) · 855 Bytes
/
sync.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
#!/usr/bin/env bash
distProject="../AsmHelperPlugin"
cpCode(){
echo "copy new code to project"
cp -vrf AsmPlugin/* $distProject
}
goDistProject() {
cd $distProject
}
pushCode() {
echo "add new code"
git add .
git commit -m "add some code"
git push origin master
git diff
}
listTag(){
git tag
}
createTag(){
git tag $1
git push --tag
echo "https://jitpack.io/"
git remote -v
}
if [ $# == 0 ]; then
echo "sh sync.sh sync|push|tag <v1.0.1>|"
elif [ $1 == "sync" ]; then
echo "sync string from a to b"
cpCode
elif [ $1 == "push" ]; then
echo "push dest project to b"
goDistProject
pushCode
listTag
elif [ $1 == "tag" ]; then
echo "create tag from a"
goDistProject
createTag $2
listTag
else
echo "sh sync.sh sync|push|tag <v1.0.1>|"
echo ""
# syncDevStr2Test
fi