From e9f77f7676effafb54fcf2e447a8bab4fdbb42ec Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Tue, 6 Mar 2018 21:59:56 +0100 Subject: [PATCH] Fix addon-linter error in dev builds --- ci/update-manifest.sh | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/ci/update-manifest.sh b/ci/update-manifest.sh index 18921cbae..66bb9e8b5 100755 --- a/ci/update-manifest.sh +++ b/ci/update-manifest.sh @@ -8,11 +8,6 @@ MANIFEST=add-on/manifest.json # restore original (make this script immutable) git checkout $MANIFEST -# Switch to self-hosted dev-build for Firefox (https://github.com/ipfs-shipyard/ipfs-companion/issues/385) -DEV_BUILD_ADDON_ID="ipfs-companion-dev-build@ci.ipfs.team" -UPDATE_URL="https://ipfs-shipyard.github.io/ipfs-companion/ci/firefox/update.json" - - # Use jq for JSON operations function set-manifest { jq -M --indent 2 "$1" < $MANIFEST > tmp.json && mv tmp.json $MANIFEST @@ -34,12 +29,18 @@ BUILD_VERSION=$(($COMMITS_IN_MASTER*10+$NEW_COMMITS_IN_CURRENT_BRANCH)) set-manifest ".version = (.version + \".${BUILD_VERSION}\")" grep \"version\" $MANIFEST - -## Set ADD-ON ID -set-manifest ".applications.gecko[\"id\"] = \"$DEV_BUILD_ADDON_ID\"" -grep ipfs-companion-dev-build $MANIFEST - -## Add UPDATE_URL -set-manifest ".applications.gecko[\"update_url\"] = \"$UPDATE_URL\"" -grep update_url $MANIFEST - +# addon-linter throws error on 'update_url' so it is disabled in dev build +# and needs to be manually opted-in when beta build is run +if [ "$1" == "firefox-beta" ]; then + # Switch to self-hosted dev-build for Firefox (https://github.com/ipfs-shipyard/ipfs-companion/issues/385) + DEV_BUILD_ADDON_ID="ipfs-companion-dev-build@ci.ipfs.team" + UPDATE_URL="https://ipfs-shipyard.github.io/ipfs-companion/ci/firefox/update.json" + + ## Set ADD-ON ID + set-manifest ".applications.gecko[\"id\"] = \"$DEV_BUILD_ADDON_ID\"" + grep ipfs-companion-dev-build $MANIFEST + + ## Add UPDATE_URL + set-manifest ".applications.gecko[\"update_url\"] = \"$UPDATE_URL\"" + grep update_url $MANIFEST +fi