mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 09:01:39 -05:00
67 lines
2.1 KiB
Bash
Executable file
67 lines
2.1 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
sign_and_submit() {
|
|
# Don't trust the return value of web-ext sign.
|
|
(source AMOKEYS && (yarn run web-ext sign -s build --api-key "$AMOKEY" --api-secret "$AMOSECRET" "$@" || true))
|
|
}
|
|
|
|
publish_beta_nonewtab() {
|
|
yarn run clean
|
|
yarn run build --no-native
|
|
scripts/version.js beta
|
|
sed 's/tridactyl.vim.betas@cmcaine/tridactyl.vim.betas.nonewtab@cmcaine/' -i build/manifest.json
|
|
sed '/\s*"newtab":.*/d' -i build/manifest.json
|
|
sed 's/"name": "Tridactyl"/"name": "Tridactyl: No New Tab"/' -i build/manifest.json
|
|
sign_and_submit -a web-ext-artifacts/nonewtab
|
|
}
|
|
|
|
publish_beta() {
|
|
yarn run clean
|
|
yarn run build --no-native
|
|
scripts/version.js beta
|
|
sed 's/"name": "Tridactyl"/"name": "Tridactyl: Beta"/' -i build/manifest.json
|
|
sign_and_submit
|
|
tar --exclude-from=<(grep -v .build_cache/ .gitignore) --exclude-vcs -czf ../../public_html/betas/tridactyl_source_beta.tar.gz .
|
|
}
|
|
|
|
build_no_sign_beta(){
|
|
yarn run clean
|
|
yarn run build --no-native
|
|
scripts/version.js beta
|
|
sed 's/"name": "Tridactyl"/"name": "Tridactyl: Beta"/' -i build/manifest.json
|
|
mkdir -p web-ext-artifacts
|
|
yarn run web-ext build --source-dir ./build --overwrite-dest
|
|
for f in web-ext-artifacts/*.zip; do
|
|
mv "$f" "${f%.zip}".xpi
|
|
done
|
|
}
|
|
|
|
build_no_sign_stable(){
|
|
yarn run clean
|
|
yarn run build --no-native
|
|
sed 's/tridactyl.vim.betas@cmcaine/tridactyl.vim@cmcaine/' -i build/manifest.json
|
|
mkdir -p web-ext-artifacts
|
|
yarn run web-ext build --source-dir ./build --overwrite-dest
|
|
for f in web-ext-artifacts/*.zip; do
|
|
mv "$f" "${f%.zip}".xpi
|
|
done
|
|
}
|
|
|
|
publish_stable() {
|
|
yarn run clean
|
|
yarn run build --no-native
|
|
sed 's/tridactyl.vim.betas@cmcaine/tridactyl.vim@cmcaine/' -i build/manifest.json
|
|
sign_and_submit
|
|
tar --exclude-from=<(grep -v .build_cache/ .gitignore) --exclude-vcs -czf ../../public_html/betas/tridactyl_source.tar.gz .
|
|
}
|
|
|
|
case $1 in
|
|
stable) publish_stable;;
|
|
nosignstable) build_no_sign_stable;;
|
|
nosignbeta) build_no_sign_beta;;
|
|
nonewtab) publish_beta_nonewtab;;
|
|
beta) publish_beta;;
|
|
*) publish_beta;;
|
|
esac
|