From dac37cd89912f126fbcc215e55c2546b90cc15e6 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Mon, 6 Jan 2020 13:13:06 +0800 Subject: [PATCH] Publish version 0.2.2 --- DoricCore.podspec | 2 +- doric-android/version.properties | 2 +- doric-js/package.json | 4 +-- doric-web/package.json | 4 +-- publish.sh | 42 ++++++++++++++++++++++++++++++++ setup.sh | 8 +++--- version | 1 + 7 files changed, 54 insertions(+), 9 deletions(-) create mode 100644 publish.sh create mode 100644 version diff --git a/DoricCore.podspec b/DoricCore.podspec index 4ea57ea6..c681a8d4 100644 --- a/DoricCore.podspec +++ b/DoricCore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'DoricCore' - s.version = '0.2.1' + s.version = '0.2.2' s.summary = 'Doric iOS SDK' diff --git a/doric-android/version.properties b/doric-android/version.properties index ac7979dd..f4f46191 100644 --- a/doric-android/version.properties +++ b/doric-android/version.properties @@ -1 +1 @@ -version=0.2.1 \ No newline at end of file +version=0.2.2 diff --git a/doric-js/package.json b/doric-js/package.json index 454868cf..4e99e875 100644 --- a/doric-js/package.json +++ b/doric-js/package.json @@ -1,6 +1,6 @@ { "name": "doric", - "version": "0.2.2-alpha.3", + "version": "0.2.2", "description": "The JS Framework of Doric", "main": "bundle/doric-vm.js", "types": "index.d.ts", @@ -31,4 +31,4 @@ "typescript": "^3.7.4", "ws": "^7.2.1" } -} \ No newline at end of file +} diff --git a/doric-web/package.json b/doric-web/package.json index 775f816a..80004fbe 100644 --- a/doric-web/package.json +++ b/doric-web/package.json @@ -1,8 +1,8 @@ { "name": "doric-web", - "version": "0.1.2", + "version": "0.2.2", "description": "Doric library for Web", - "main": "build/index.js", + "main": "dist/index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "build": "tsc -p .&& rollup -c" diff --git a/publish.sh b/publish.sh new file mode 100644 index 00000000..720454e5 --- /dev/null +++ b/publish.sh @@ -0,0 +1,42 @@ +#!/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 + +# 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 + +## Web +cd $CURRENT_DIR/doric-web && npm version $CURRENT_VERSION --allow-same-version + +# git save +cd $CURRENT_DIR/ + +echo "Commit changes" +git add . + +git commit -m "Publish version $CURRENT_VERSION" + +git tag $CURRENT_VERSION + +echo "Push Changes" + +cd $CURRENT_DIR/doric-js && npm publish +cd $CURRENT_DIR/doric-web && npm publish +# cd $CURRENT_DIR/doric-android && ./gradlew clean publishAll +cd $CURRENT_DIR && pod trunk push --allow-warnings \ No newline at end of file diff --git a/setup.sh b/setup.sh index bf19b01f..adff8422 100755 --- a/setup.sh +++ b/setup.sh @@ -4,6 +4,8 @@ ## Init Develop Environment ## ############################################################################## -cd doric-js && npm install && npm run build && cd .. -cd doric-demo && npm install && npm run build && cd .. -cd doric-cli && npm install && npm link && cd .. +CURRENT_DIR=$(cd $(dirname $0); pwd) + +cd $CURRENT_DIR/doric-js && npm install && npm run build +cd $CURRENT_DIR/doric-demo && npm install && npm run build +cd $CURRENT_DIR/doric-cli && npm install && npm link \ No newline at end of file diff --git a/version b/version new file mode 100644 index 00000000..f4778493 --- /dev/null +++ b/version @@ -0,0 +1 @@ +0.2.2 \ No newline at end of file