diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2015-07-28 18:40:16 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2015-07-28 18:49:16 +0200 |
commit | 0d6a1b76ab87d49a2664c762ecdf9b34e9e5d63f (patch) | |
tree | f0435e0d175f1d773e27eb8194bb8fc7ce6f2847 /nix-script-switch.sh | |
parent | 63c7df1e39ca4fbd0a68bd1bc4c9e4d304150885 (diff) |
switch: Add support for custom git-tag flags, to be able to do annotated tagging
Diffstat (limited to 'nix-script-switch.sh')
-rwxr-xr-x | nix-script-switch.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/nix-script-switch.sh b/nix-script-switch.sh index 37ff29e..f81b04d 100755 --- a/nix-script-switch.sh +++ b/nix-script-switch.sh @@ -16,6 +16,7 @@ usage() { -n DON'T include hostname in tag name -t <tagname> Custom tag name -p <pkgs> Generate the switch tag in the nixpkgs at <pkgs> as well. + -f <tag-flags> Flags for git-tag (see 'git tag --help') -h Show this help and exit This command helps you rebuilding your system and keeping track @@ -51,8 +52,9 @@ WD= TAG_NAME= HOSTNAME="$(hostname)" NIXPKGS="" +TAG_FLAGS="" -while getopts "c:w:t:np:h" OPTION +while getopts "c:w:t:np:f:h" OPTION do case $OPTION in c) @@ -78,6 +80,11 @@ do stdout "NIXPKGS = $NIXPKGS" ;; + f) + TAG_FLAGS=$OPTARG + dbg "TAG_FLAGS = $TAG_FLAGS" + ;; + h) usage exit 1 @@ -132,7 +139,7 @@ then fi fi - __git "$WD" tag "$TAG_NAME" + __git "$WD" tag $TAG_FLAGS "$TAG_NAME" if [[ ! -z "$NIXPKGS" ]] then |