aboutsummaryrefslogtreecommitdiff
path: root/scripts/trigger_release_build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/trigger_release_build.sh')
-rwxr-xr-xscripts/trigger_release_build.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/scripts/trigger_release_build.sh b/scripts/trigger_release_build.sh
new file mode 100755
index 000000000..0b45a0f67
--- /dev/null
+++ b/scripts/trigger_release_build.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+if [ -z "${CIRCLE_CI_API}" ]; then
+ echo "Could not find CIRCLE_CI_API environment variable"
+ exit 1
+fi
+
+curl "https://circleci.com/api/v1.1/project/github/AnySoftKeyboard/AnySoftKeyboard?circle-token=${CIRCLE_CI_API}" -o /tmp/recentbuilds.txt
+echo "Recent builds:"
+head -n 60 /tmp/recentbuilds.txt
+
+read -p "Continue with triggerring release build? " -n 1 -r
+echo # (optional) move to a new line
+if [[ $REPLY =~ ^[Yy]$ ]]
+then
+ echo "!!!!!!!!!!!!!!RELEASING!!!!!!!!!!"
+ curl \
+ -o /tmp/buildtrigger.txt
+ --header "Content-Type: application/json" \
+ --data '{"build_parameters": {"ASK_RELEASE_VARIANT": "TRUE"}}' \
+ --request POST \
+ "https://circleci.com/api/v1.1/project/github/AnySoftKeyboard/AnySoftKeyboard/tree/master?circle-token=$CIRCLE_CI_API"
+ echo "**Result:"
+ cat /tmp/buildtrigger.txt
+ echo "**End of result."
+else
+ echo "Okay, no release."
+fi \ No newline at end of file