diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2015-07-28 20:28:25 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2015-08-01 20:46:55 +0200 |
commit | c0f9f07453baeb081a798d4c8fcb5cbe391fbe69 (patch) | |
tree | 37806122575115021802eee8ecc3f282380460de | |
parent | 681c822b635ff2e04fea006fe0feb87c29b4993b (diff) |
Add RC variable for tagging flags for tagging in nixpkgs repo on switch command
-rw-r--r-- | example.rc | 6 | ||||
-rwxr-xr-x | nix-script | 1 | ||||
-rwxr-xr-x | nix-script-switch.sh | 3 |
3 files changed, 9 insertions, 1 deletions
@@ -28,3 +28,9 @@ RC_NIXPKGS=~/nixpkgs # RC_SWITCH_DEFAULT_TAG_FLAGS="-a" + +# +# default flags for git-tagging nixpkgs when doing nix-script switch +# +RC_SWITCH_DEFAULT_TAG_FLAGS_NIXPKGS="" + @@ -122,6 +122,7 @@ then RC_CONFIG="" RC_NIXPKGS="" RC_SWITCH_DEFAULT_TAG_FLAGS="" + RC_SWITCH_DEFAULT_TAG_FLAGS_NIXPKGS="" else source $RC fi diff --git a/nix-script-switch.sh b/nix-script-switch.sh index b6e8a2b..c781623 100755 --- a/nix-script-switch.sh +++ b/nix-script-switch.sh @@ -54,6 +54,7 @@ TAG_NAME= HOSTNAME="$(hostname)" NIXPKGS=$RC_NIXPKGS TAG_FLAGS="$RC_SWITCH_DEFAULT_TAG_FLAGS" +TAG_FLAGS_NIXPKGS="$RC_SWITCH_DEFAULT_TAG_FLAGS_NIXPKGS" DONT_BUILD= while getopts "c:w:t:nbp:f:h" OPTION @@ -114,7 +115,7 @@ tag_nixpkgs() { c_txt="Trying to create tag '$TAG_NAME' at '$1' on commit '$commit'" continue_question "$c_txt" || return - __git "$1" tag -a "$TAG_NAME" $commit || \ + __git "$1" tag $TAG_FLAGS_NIXPKGS "$TAG_NAME" $commit || \ stderr "Could not create tag in nixpkgs clone" } |