Skip to content

Commit

Permalink
improve release script, build archiveror source zip
Browse files Browse the repository at this point in the history
  • Loading branch information
rahiel committed Oct 18, 2019
1 parent f5a6928 commit 10fdb48
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,30 @@ BROWSER=$1
rm -rf "$dist"
mkdir "$dist"
find src/ -not -name "*.js" -exec cp '{}' "$dist" \;
cp LICENSE.txt "$dist"
cp README.md LICENSE.txt "$dist"
npm run build

cd "$dist"
echo

rm -f archiveror.zip archiveror-source.zip

if [[ $BROWSER = 'chromium' ]]; then
cd "$dist"
# the "applications" key is only supported on Firefox
jq 'del(.applications)' manifest.json > mani.json
rm manifest.json
mv mani.json manifest.json
cd -
elif [[ $BROWSER = 'firefox' ]]; then
echo -e "\nMaking archiveror-source.zip for Firefox..."
zip -r archiveror-source.zip src/ build.bash package.json package-lock.json webpack.config.js README.md LICENSE.txt
else
echo "Invalid browser choice!"
exit 1
fi

zip archiveror.zip *.js *.html *.css *.png manifest.json LICENSE.txt
cd "$dist"
echo -e "\nMaking archiveror.zip..."
zip archiveror.zip *.js *.html *.css *.png manifest.json README.md LICENSE.txt
cd -
mv "$dist"/archiveror.zip ./

0 comments on commit 10fdb48

Please sign in to comment.