Skip to content

Commit

Permalink
fixed shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Le0Michine committed Dec 9, 2017
1 parent 0f236cd commit f907bdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
export ACCESS_TOKEN=$(curl "https://accounts.google.com/o/oauth2/token" -d "client_id=${CLIENT_ID}&client_secret=${CLIENT_SECRET}&refresh_token=${REFRESH_TOKEN}&grant_type=refresh_token&redirect_uri=urn:ietf:wg:oauth:2.0:oob" | jq -r .access_token)
UPLOAD_RESULT=(curl -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-goog-api-version: 2" -X PUT -T out/out.zip -v "https://www.googleapis.com/upload/chromewebstore/v1.1/items/${APP_ID}")
UPLOAD_RESULT=$(curl -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-goog-api-version: 2" -X PUT -T out/out.zip -v "https://www.googleapis.com/upload/chromewebstore/v1.1/items/${APP_ID}")
echo Package uploaded
echo $UPLOAD_RESULT
if [ "$(echo $UPLOAD_RESULT | jq -r .uploadState)" == "FAILURE" ]; then
Expand All @@ -62,7 +62,7 @@ jobs:
name: "Publish Extension to the Google Chrome Store"
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
PUBLISH_RESULT=$(curl -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-goog-api-version: 2" -H "Content-Length: 0" -X POST -v "https://www.googleapis.com/chromewebstore/v1.1/items/${APP_ID}/publish" | jq .uploadState)
PUBLISH_RESULT=$(curl -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-goog-api-version: 2" -H "Content-Length: 0" -X POST -v "https://www.googleapis.com/chromewebstore/v1.1/items/${APP_ID}/publish")
echo Package published
echo $PUBLISH_RESULT
if [ "$(echo $PUBLISH_RESULT | jq -r .status)" != "["OK"]" ]; then
Expand Down

0 comments on commit f907bdc

Please sign in to comment.