-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.sh
44 lines (30 loc) · 986 Bytes
/
publish.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
#!/usr/bin/env bash
##############################################################################
##
## Publish JS,Android,iOS
##
##############################################################################
CURRENT_DIR=$(cd $(dirname $0); pwd)
CURRENT_VERSION=$(cat $CURRENT_DIR/version)
echo "Current version is "$CURRENT_VERSION
## iOS
sed -i "" "s/\(version[ ]*= \)'[0-9 \.]*'/\1'$CURRENT_VERSION'/g" $CURRENT_DIR/DoricFs.podspec
# git save
cd $CURRENT_DIR/
echo "Commit changes"
git add .
git commit -m "Release v${CURRENT_VERSION}"
## JS
cd $CURRENT_DIR && npm version $CURRENT_VERSION --allow-same-version
git tag ${CURRENT_VERSION}
git push
git push --tags
npm install doric-cli -g
npm install
cd example && npm install && cd ..
echo "Publish JS"
cd $CURRENT_DIR/ && npm publish
echo "Publish Android"
cd $CURRENT_DIR/example/android && ./gradlew clean :lib:uploadArchives
echo "Publish iOS"
cd $CURRENT_DIR && pod trunk push DoricFs.podspec --allow-warnings