28 lines
758 B
Bash
Executable File
28 lines
758 B
Bash
Executable File
#!/bin/bash
|
|
|
|
|
|
TRACK=${TRACK:-alpha}
|
|
RELEASE_STATUS=${RELEASE_STATUS:-completed}
|
|
RELEASE_MESSAGE="${RELEASE_MESSAGE:-New version}"
|
|
|
|
|
|
VERSION_AND_CODE="$(cat pubspec.yaml | grep 'version:' | sed 's/version: //')"
|
|
VERISON_NAME="$(echo $VERSION_AND_CODE | cut -d+ -f1)"
|
|
VERSION_CODE="$(echo $VERSION_AND_CODE | cut -d+ -f2)"
|
|
|
|
WD="$(realpath $(dirname $0))"
|
|
export
|
|
|
|
pushd "${WD}/publish-android-js/"
|
|
|
|
npm install
|
|
./node_modules/.bin/tsc
|
|
npm install -g --save googleapis
|
|
|
|
GOOGLE_APPLICATION_CREDENTIALS=/var/run/secrets/google_api.key.json \
|
|
node ${WD}/publish-android-js/publish-app-store.js \
|
|
"$TRACK" "$VERSION_CODE" "$RELEASE_STATUS" "$VERSION_CODE $VERISON_NAME" "$RELEASE_MESSAGE" ${WD}/../build/app/outputs/bundle/release/app-release.aab \
|
|
|| exit 1
|
|
|
|
popd
|