From d5d91f809558ab92348acd25d0892cc0bd3f3c24 Mon Sep 17 00:00:00 2001 From: Stefan Schueller Date: Sat, 6 Feb 2021 15:08:34 +0100 Subject: [PATCH] chore: Updated DEPLOYMENT.md and fix github release script --- DEPLOYMENT.md | 13 +++++-------- ci-scripts/make-github-release.sh | 4 ++-- ci-scripts/update-changelog.sh | 11 ----------- 3 files changed, 7 insertions(+), 21 deletions(-) delete mode 100644 ci-scripts/update-changelog.sh diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md index 6aedc74..3ce9e4c 100644 --- a/DEPLOYMENT.md +++ b/DEPLOYMENT.md @@ -4,13 +4,10 @@ 2. Locally switch to develop 3. Pull github develop 4. Pull weblate develop - 5. Add change logs (fastlane/metadata/android/en-US/changelogs/XXX.txt) - 6. Run ci-script/update-changelog.sh - 7. Push to gitlab - 8. Merge request into master and merge - 9. Add Release Tag on master branch - 10. Release to play store - 11. Wait for gitlab -> github sync - 12. Run publishGithub + 5. Push to develop gitlab and github + 6. Merge develop into master and merge + 7. Wait for Release Build and release to play store + 8. Wait for gitlab -> github sync + 9. Run publishGithub diff --git a/ci-scripts/make-github-release.sh b/ci-scripts/make-github-release.sh index 3fb95a8..7e4dea3 100755 --- a/ci-scripts/make-github-release.sh +++ b/ci-scripts/make-github-release.sh @@ -33,10 +33,10 @@ postdata="{\"tag_name\":\"${CI_COMMIT_TAG}\",\"target_commitish\":\"master\",\"n # Generate Release echo "Generate Release..." -echo "${postdata}" | jq +echo "${postdata}" | jq . res=$(curl -s -X POST -H "Content-Type:application/json" -H "Authorization: token ${github_token}" https://${username}@api.github.com/repos/${repo}/releases -d "${postdata}") -echo "${res}" | jq +echo "${res}" | jq . release_id=$(echo "${res}" | jq '.id') diff --git a/ci-scripts/update-changelog.sh b/ci-scripts/update-changelog.sh deleted file mode 100644 index e558bfb..0000000 --- a/ci-scripts/update-changelog.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -# External environment variables -VERSION_CODE="$1" -export VERSION_NAME=${VERSION_CODE:0:1}.${VERSION_CODE:1:1}.${VERSION_CODE:2} - -CHANGES=$(cat fastlane/metadata/android/en-US/changelogs/$VERSION_CODE.txt) - -DATE=$(date '+%Y-%m-%d') -NEW="### Version ${VERSION_NAME} Tag: v${VERSION_NAME} (${DATE})\n${CHANGES}\n" -echo -e "${NEW}\n$(cat CHANGELOG.md)" > CHANGELOG.md \ No newline at end of file