-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor parts of release.sh into the grunt targets (#2797)
remove release.sh and removekey.py, moving parts to separate scripts and integrating with grunt dist
- Loading branch information
Showing
4 changed files
with
51 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
# Creates the .zips used in preparation for | ||
# releasing uProxy for Chrome: | ||
# - build/dist/uproxy-chrome.zip is for team fishfood | ||
# - build/dist/chrome/uproxy-chrome-*.zip have the key | ||
# in their manifests stripped and are for uploading | ||
# to the Chrome Web Store | ||
# | ||
# This is intended to be called as part of "grunt dist". | ||
|
||
readonly DIST_DIR=build/dist | ||
readonly REQUIRED_COMMANDS="zip jq" | ||
|
||
set -e | ||
|
||
if [[ ! -d $DIST_DIR ]]; then | ||
echo "could not find directory $DIST_DIR, have you run grunt dist?" >&2 | ||
exit 1 | ||
fi | ||
|
||
command_exists() { | ||
command -v "$@" > /dev/null 2>&1 | ||
} | ||
|
||
for command in $REQUIRED_COMMANDS; do | ||
if ! command_exists $command; then | ||
echo "could not $command, please install requirements first: $REQUIRED_COMMANDS" >&2 | ||
exit 1 | ||
fi | ||
done | ||
|
||
# Fishfood. | ||
pushd $DIST_DIR &>/dev/null | ||
zip -r uproxy-chrome.zip chrome | ||
|
||
# Chrome Web Store. | ||
pushd chrome &>/dev/null | ||
|
||
for manifest in app/manifest.json extension/manifest.json; do | ||
jq 'del(.key)' $manifest > $manifest.tmp | ||
mv $manifest.tmp $manifest | ||
done | ||
|
||
zip -r uproxy-chrome-app.zip app | ||
zip -r uproxy-chrome-extension.zip extension |