This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
comptaplan_app/tools/jenkins-publish-android.sh
cghislai 67a71e2aa0
Some checks reported errors
gestemps/comptaplanapp/pipeline/head There was a failure building this commit
valuya/comptaplan_app/pipeline/head Something is wrong with the build of this commit
jenkinsfile & script: Fix passing upload track correctly
2022-01-19 22:18:57 +01:00

28 lines
802 B
Bash
Executable File

#!/bin/bash
ANDROID_UPLOAD_TRACK=${ANDROID_UPLOAD_TRACK:-alpha}
RELEASE_STATUS=${RELEASE_STATUS:-completed}
RELEASE_MESSAGE="${RELEASE_MESSAGE:-New version}"
GOOGLE_APPLICATION_CREDENTIALS="${GOOGLE_APPLICATION_CREDENTIALS:-}"
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
node ${WD}/publish-android-js/publish-app-store.js \
"$ANDROID_UPLOAD_TRACK" "$VERSION_CODE" "$RELEASE_STATUS" "$VERSION_CODE $VERISON_NAME" "$RELEASE_MESSAGE" ${WD}/../build/app/outputs/bundle/release/app-release.aab \
|| exit 1
popd