From c0f9f07453baeb081a798d4c8fcb5cbe391fbe69 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 28 Jul 2015 20:28:25 +0200 Subject: Add RC variable for tagging flags for tagging in nixpkgs repo on switch command --- example.rc | 6 ++++++ nix-script | 1 + nix-script-switch.sh | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/example.rc b/example.rc index 2b307ed..03776b7 100644 --- a/example.rc +++ b/example.rc @@ -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="" + diff --git a/nix-script b/nix-script index 9af2f4f..93d4b8e 100755 --- a/nix-script +++ b/nix-script @@ -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" } -- cgit v1.2.3