Skip to content

Instantly share code, notes, and snippets.

@p3lim
Last active November 29, 2021 05:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save p3lim/d77edf45f2c6e29b6f2dc23140028a45 to your computer and use it in GitHub Desktop.
Save p3lim/d77edf45f2c6e29b6f2dc23140028a45 to your computer and use it in GitHub Desktop.
DO NOT DELETE, ARCHIVAL PURPOSES
sudo: false
language: c
addons:
apt:
packages:
- luarocks
- pandoc
install:
- eval $(luarocks path --bin)
- luarocks install --local luacheck
script: /home/travis/.luarocks/bin/luacheck . --no-color -quiet -only "011"
after_script:
- curl -sO https://raw.githubusercontent.com/BigWigsMods/packager/master/release.sh
- curl -s https://gist.githubusercontent.com/p3lim/d77edf45f2c6e29b6f2dc23140028a45/raw/8974b8b8856dc33d658402b2a88bf888da46c259/release.patch | git apply -v
- bash release.sh
notifications:
email:
on_failure: always
on_success: never
cache:
apt: true
directories:
- $HOME/.luarocks
branches:
only:
- /^r\d+(-(alpha|beta))?(-\d+)?$/
diff --git a/release.sh b/release.sh
index 652b580..9b1f491 100644
--- a/release.sh
+++ b/release.sh
@@ -1788,13 +1788,18 @@ if [ -z "$skip_zipfile" ]; then
# word "release", then it is considered a release tag. If the above
# conditions don't match, it is considered a beta tag. Untagged commits
# are considered alphas.
- file_type=alpha
+ file_type=
if [ -n "$tag" ]; then
- if [[ "$tag" =~ ^v?[0-9][0-9.]*$ || "${tag,,}" == *"release"* ]]; then
- file_type=release
- else
+ if [[ "${tag,,}" == *"alpha"* ]]; then
+ file_type=alpha
+ elif [[ "${tag,,}" == *"beta"* ]]; then
file_type=beta
+ else
+ file_type=release
fi
+ else
+ echo "Found no tag, exiting."
+ exit 0
fi
_cf_payload=$( cat <<-EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment