This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/publish.sh

59 lines
1.5 KiB
Bash
Raw Normal View History

2020-01-06 13:13:06 +08:00
#!/usr/bin/env bash
##############################################################################
##
## Publish JS,Android,iOS,Web
##
##############################################################################
CURRENT_DIR=$(cd $(dirname $0); pwd)
CURRENT_VERSION=$(cat $CURRENT_DIR/version)
echo "Current version is "$CURRENT_VERSION
2020-02-19 18:49:00 +08:00
cd $CURRENT_DIR && sh bundle.sh
2020-01-06 13:13:06 +08:00
# Modify
## JS
cd $CURRENT_DIR/doric-js && npm version $CURRENT_VERSION --allow-same-version
## Android
echo "version="$CURRENT_VERSION > $CURRENT_DIR/doric-android/version.properties
## iOS
sed -i "" "s/\(version[ ]*= \)'[0-9 \.]*'/\1'$CURRENT_VERSION'/g" $CURRENT_DIR/DoricCore.podspec
2020-02-27 18:43:00 +08:00
sed -i "" "s/\(version[ ]*= \)'[0-9 \.]*'/\1'$CURRENT_VERSION'/g" $CURRENT_DIR/DoricDevkit.podspec
2020-01-06 13:13:06 +08:00
## Web
cd $CURRENT_DIR/doric-web && npm version $CURRENT_VERSION --allow-same-version
2020-03-21 16:18:01 +08:00
## CLI
echo $CURRENT_VERSION > $CURRENT_DIR/doric-cli/target/version
2020-04-11 15:05:27 +08:00
cd $CURRENT_DIR/doric-cli && npm version $CURRENT_VERSION --allow-same-version
2020-01-06 13:13:06 +08:00
# git save
cd $CURRENT_DIR/
echo "Commit changes"
2020-03-25 16:04:22 +08:00
git add .
git commit -m "Release v${CURRENT_VERSION}"
git tag ${CURRENT_VERSION}
git push
git push --tags
2020-04-16 14:35:14 +08:00
echo "Publish CLI"
cd $CURRENT_DIR/doric-cli && npm publish
2020-01-06 13:22:06 +08:00
echo "Publish JS"
2020-01-06 13:13:06 +08:00
cd $CURRENT_DIR/doric-js && npm publish
2020-01-06 13:22:06 +08:00
echo "Publish Web"
2020-01-06 13:13:06 +08:00
cd $CURRENT_DIR/doric-web && npm publish
2020-01-06 13:22:06 +08:00
echo "Publish Android"
cd $CURRENT_DIR/doric-android && ./gradlew clean publishAll
echo "Publish iOS"
2020-02-29 15:14:47 +08:00
cd $CURRENT_DIR && pod trunk push DoricCore.podspec --allow-warnings && pod trunk push DoricDevkit.podspec --allow-warnings