From 9ab0d94578af8e79b64809b07346db89a07b7f61 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 9 Feb 2012 00:50:15 +0100 Subject: archrelease: Validate tags before releasing Compare every single tag with a list of valid tags. This prevents broken releases which occurred whenever someone made a typo on the command line: $ ./archrelease community i686 ==> ERROR: archrelease: Invalid tag: "community" (use -f to force release) Since the list is used in the ZSH completion as well, break it out to a separate file and move it to "lib/". Also, add a command line parameter to allow for releasing to an unknown repository when necessary. Signed-off-by: Lukas Fleischer Signed-off-by: Pierre Schmitz --- lib/valid-tags.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/valid-tags.sh (limited to 'lib') diff --git a/lib/valid-tags.sh b/lib/valid-tags.sh new file mode 100644 index 0000000..36918fe --- /dev/null +++ b/lib/valid-tags.sh @@ -0,0 +1,20 @@ +_arch=( + i686 + x86_64 + any +) + +_tags=( + core-i686 core-x86_64 core-any + extra-i686 extra-x86_64 extra-any + multilib-x86_64 + staging-i686 staging-x86_64 staging-any + testing-i686 testing-x86_64 testing-any + multilib-testing-x86_64 + multilib-staging-x86_64 + community-i686 community-x86_64 community-any + community-staging-i686 community-staging-x86_64 community-staging-any + community-testing-i686 community-testing-x86_64 community-testing-any + kde-unstable-i686 kde-unstable-x86_64 kde-unstable-any + gnome-unstable-i686 gnome-unstable-x86_64 gnome-unstable-any +) -- cgit v1.2.3-70-g09d2