Skip to content

Commit

Permalink
Show tokens with -n help
Browse files Browse the repository at this point in the history
  • Loading branch information
nebularg committed Apr 5, 2021
1 parent c2c3f65 commit 7cf9e09
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ The recommended way to include __release.sh__ in a project is to:
-a wago-id Set the project id used on Wago Addons for uploading. (Use 0 to unset the TOC value)
-g game-version Set the game version to use for uploading.
-m pkgmeta.yaml Set the pkgmeta file to use.
-n archive-name Set the archive name template. Defaults to "{package-name}-{project-version}{nolib}{classic}".
-n archive-name Set the archive name template. Use "-n help" for more info.

### Uploading

Expand Down
18 changes: 18 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,24 @@ while getopts ":celLzusop:dw:a:r:t:g:m:n:" opt; do
pkgmeta_file="$OPTARG"
;;
n)
if [ "$OPTARG" = "help" ]; then
cat <<-'EOF' >&2
Set the archive name template. There are several string substitutions you can use to
include version control or build type infomation in the file name.
The default file name is "{package-name}-{project-version}{nolib}{classic}".
Tokens: {package-name}{project-revision}{project-hash}{project-abbreviated-hash}
{project-author}{project-date-iso}{project-date-integer}{project-timestamp}
{project-version}{game-type}{release-type}
Flags: {alpha}{beta}{nolib}{classic}
Tokens are always replaced with their value. Flags are shown prefixed with a dash
depending on the build type.
EOF
exit 0
fi
# TODO some sort of validation?
file_name="$OPTARG"
;;
Expand Down

0 comments on commit 7cf9e09

Please sign in to comment.