diff --git a/packages/wallet-sdk/package.json b/packages/wallet-sdk/package.json index 1113478aa9..a186012e76 100644 --- a/packages/wallet-sdk/package.json +++ b/packages/wallet-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@coinbase/wallet-sdk", - "version": "3.9.0-canary.5", + "version": "3.9.0", "description": "Coinbase Wallet JavaScript SDK", "keywords": [ "cipher", diff --git a/scripts/release.sh b/scripts/release.sh index 235bd4f364..fd026b76f1 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -7,17 +7,31 @@ PURPLE='\033[0;35m' TEAL='\033[0;36m' GREEN='\033[1;32m' +isCanary=false +if [[ " $* " == *" canary "* ]]; then + echo -e "Preparing canary release..." + isCanary=true + + local dir="./packages/wallet-sdk" + local packageJson="$dir/package.json" + local timestamp=$(date +%s) + local newVersion=$(jq -r '.version' "$packageJson")"-canary.$timestamp" + jq ".version = \"$newVersion\"" "$packageJson" > "$dir/temp.json" && \ + mv "$dir/temp.json" "$packageJson" + echo "Canary version updated to $newVersion" +fi + gitMessage=$(git log --oneline -n 1) mainBranch="master" branch=$(git rev-parse --abbrev-ref HEAD) -if [ $branch == $mainBranch ]; then - echo -e "${PURPLE} Checking all branches are up-to-date..." - echo -e "=================================================" - echo -e " git fetch --all" - git fetch --all - echo -e " git pull" - git pull +if [ $branch == $mainBranch ] || [$isCanary == true]; then + # echo -e "${PURPLE} Checking all branches are up-to-date..." + # echo -e "=================================================" + # echo -e " git fetch --all" + # git fetch --all + # echo -e " git pull" + # git pull echo -e "-------------------------------------------------" echo -e "${TEAL} Build production and publish..." echo "================================================="