aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-03-31 06:53:45 +0800
committerkumavis <aaron@kumavis.me>2018-03-31 06:53:45 +0800
commit213496f19008f922300b21cd04a48b09bd021173 (patch)
tree8145af2ff3325cce9f234d675fb3ac642ccda05f
parent86c768dfb098e5e0166ec3a007871597476d6cf2 (diff)
downloadtangerine-wallet-browser-213496f19008f922300b21cd04a48b09bd021173.tar
tangerine-wallet-browser-213496f19008f922300b21cd04a48b09bd021173.tar.gz
tangerine-wallet-browser-213496f19008f922300b21cd04a48b09bd021173.tar.bz2
tangerine-wallet-browser-213496f19008f922300b21cd04a48b09bd021173.tar.lz
tangerine-wallet-browser-213496f19008f922300b21cd04a48b09bd021173.tar.xz
tangerine-wallet-browser-213496f19008f922300b21cd04a48b09bd021173.tar.zst
tangerine-wallet-browser-213496f19008f922300b21cd04a48b09bd021173.zip
ci - build:announce - break out into shell script
-rw-r--r--.circleci/config.yml33
-rwxr-xr-xdevelopment/metamaskbot-build-announce.sh34
2 files changed, 35 insertions, 32 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 5512bf4c9..2ba5b8e12 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -111,38 +111,7 @@ jobs:
destination: builds
- run:
name: build:announce
- command: |
- CIRCLE_PR_NUMBER="${CIRCLE_PR_NUMBER:-${CIRCLE_PULL_REQUEST##*/}}"
- SHORT_SHA1=$(echo $CIRCLE_SHA1 | cut -c 1-7)
- BUILD_LINK_BASE="https://$CIRCLE_BUILD_NUM-42009758-gh.circle-artifacts.com/0"
- VERSION=$(node -p 'require("./dist/chrome/manifest.json").version')
-
- MASCARA="$BUILD_LINK_BASE/builds/mascara/home.html"
- CHROME="$BUILD_LINK_BASE/builds/metamask-chrome-$VERSION.zip"
- FIREFOX="$BUILD_LINK_BASE/builds/metamask-firefox-$VERSION.zip"
- EDGE="$BUILD_LINK_BASE/builds/metamask-edge-$VERSION.zip"
- OPERA="$BUILD_LINK_BASE/builds/metamask-opera-$VERSION.zip"
- WALKTHROUGH="$BUILD_LINK_BASE/test-artifacts/screens/walkthrough%20%28en%29.gif"
-
- read -d '' COMMENT_BODY <<EOF
- <details>
- <summary>
- Builds ready [$SHORT_SHA1]:
- <a href="$MASCARA">mascara</a>,
- <a href="$CHROME">chrome</a>,
- <a href="$FIREFOX">firefox</a>,
- <a href="$EDGE">edge</a>,
- <a href="$OPER">opera</a>
- </summary>
- <image src="$WALKTHROUGH">
- </details>
- EOF
-
- JSON_PAYLOAD="{\"body\":\"$COMMENT_BODY\"}"
- POST_COMMENT_URI="https://api.github.com/repos/metamask/metamask-extension/issues/$CIRCLE_PR_NUMBER/comments"
- echo "Announcement:\n$COMMENT_BODY"
- echo "Posting to $POST_COMMENT_URI"
- curl -d "$JSON_PAYLOAD" -H "Authorization: token $GITHUB_COMMENT_TOKEN" $POST_COMMENT_URI
+ command: ./development/metamaskbot-build-announce
prep-scss:
docker:
diff --git a/development/metamaskbot-build-announce.sh b/development/metamaskbot-build-announce.sh
new file mode 100755
index 000000000..7b244addd
--- /dev/null
+++ b/development/metamaskbot-build-announce.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+CIRCLE_PR_NUMBER="${CIRCLE_PR_NUMBER:-${CIRCLE_PULL_REQUEST##*/}}"
+SHORT_SHA1=$(echo $CIRCLE_SHA1 | cut -c 1-7)
+BUILD_LINK_BASE="https://$CIRCLE_BUILD_NUM-42009758-gh.circle-artifacts.com/0"
+VERSION=$(node -p 'require("./dist/chrome/manifest.json").version')
+
+MASCARA="$BUILD_LINK_BASE/builds/mascara/home.html"
+CHROME="$BUILD_LINK_BASE/builds/metamask-chrome-$VERSION.zip"
+FIREFOX="$BUILD_LINK_BASE/builds/metamask-firefox-$VERSION.zip"
+EDGE="$BUILD_LINK_BASE/builds/metamask-edge-$VERSION.zip"
+OPERA="$BUILD_LINK_BASE/builds/metamask-opera-$VERSION.zip"
+WALKTHROUGH="$BUILD_LINK_BASE/test-artifacts/screens/walkthrough%20%28en%29.gif"
+
+read -d '' COMMENT_BODY <<EOF
+<details>
+ <summary>
+ Builds ready [$SHORT_SHA1]:
+ <a href="$MASCARA">mascara</a>,
+ <a href="$CHROME">chrome</a>,
+ <a href="$FIREFOX">firefox</a>,
+ <a href="$EDGE">edge</a>,
+ <a href="$OPERA">opera</a>
+ </summary>
+ <image src="$WALKTHROUGH">
+</details>
+EOF
+
+JSON_PAYLOAD="{\"body\":\"$COMMENT_BODY\"}"
+POST_COMMENT_URI="https://api.github.com/repos/metamask/metamask-extension/issues/$CIRCLE_PR_NUMBER/comments"
+echo "Announcement:"
+echo "$COMMENT_BODY"
+echo "Posting to $POST_COMMENT_URI"
+curl -d "$JSON_PAYLOAD" -H "Authorization: token $GITHUB_COMMENT_TOKEN" $POST_COMMENT_URI