mirror of
https://github.com/tubearchivist/browser-extension.git
synced 2024-11-22 19:50:12 +00:00
extension package and publish script
This commit is contained in:
parent
88fda65b9b
commit
da551ed9d0
51
deploy.sh
Executable file
51
deploy.sh
Executable file
@ -0,0 +1,51 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# build package
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [[ $(basename "$(pwd)") != 'tubearchivist_browserextension' ]]; then
|
||||||
|
echo 'not in tubearchivist_browserextension folder'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "\ncreate new version:\n"
|
||||||
|
read -r VERSION
|
||||||
|
|
||||||
|
|
||||||
|
# build release zip files
|
||||||
|
function create_zip {
|
||||||
|
cd extension
|
||||||
|
|
||||||
|
# firefox
|
||||||
|
rm manifest.json
|
||||||
|
cp manifest-firefox.json manifest.json
|
||||||
|
zip -rq ../release/ta-companion-"$VERSION"-firefox.zip . \
|
||||||
|
-x manifest-chrome.json -x manifest-firefox.json
|
||||||
|
|
||||||
|
# chrome
|
||||||
|
rm manifest.json
|
||||||
|
cp manifest-chrome.json manifest.json
|
||||||
|
zip -rq ../release/ta-companion-"$VERSION"-chrome.zip . \
|
||||||
|
-x manifest-chrome.json -x manifest-firefox.json
|
||||||
|
|
||||||
|
rm manifest.json
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# create release tag
|
||||||
|
function create_release {
|
||||||
|
|
||||||
|
git tag -a "$VERSION" -m "new release version $VERSION"
|
||||||
|
git push all "$VERSION"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
create_zip
|
||||||
|
create_release
|
||||||
|
|
||||||
|
|
||||||
|
##
|
||||||
|
exit 0
|
Loading…
Reference in New Issue
Block a user