Add --tag parameter to the archive fetcher

OBS-URL: https://build.opensuse.org/package/show/Documentation:Tools/suse-xsl-stylesheets?expand=0&rev=106
This commit is contained in:
Stefan Knorr 2016-09-15 12:28:57 +00:00 committed by Git OBS Bridge
parent 4cd279d792
commit d8379db7bf
2 changed files with 6 additions and 3 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:7eb98a37bf0e4db0f58015d3e83d174c68c061f1c6477de603e7c2594bcc84ee oid sha256:2192263cbf8bd10602956ebc8dbe10132d2b67f18ab9cf48b4086ab6b3b52dcd
size 1795376 size 1795842

View File

@ -70,7 +70,10 @@ esac
# Check for archive file name # Check for archive file name
# #
if [[ -z $1 ]]; then if [[ -z $1 ]]; then
exit_on_error "Please specify a URl for a suse-xsl release archive on Github, e.g.\https://github.com/openSUSE/suse-xsl/archive/2.0-rc5.tar.gz" exit_on_error "Please specify a URL for a suse-xsl release archive on Github, e.g.\https://github.com/openSUSE/suse-xsl/archive/2.0-rc5.tar.gz. Alternatively, use --tag [TAG_NAME]."
elif [[ $1 = '--tag' ]] && [[ $2 ]]; then
ARCHIVE_URL="https://github.com/openSUSE/suse-xsl/archive/$2.tar.gz"
ARCHIVE_NAME="${ARCHIVE_URL##*/}"
else else
ARCHIVE_URL="$1" ARCHIVE_URL="$1"
ARCHIVE_NAME="${ARCHIVE_URL##*/}" ARCHIVE_NAME="${ARCHIVE_URL##*/}"