summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2015-07-28 20:28:25 +0200
committerMatthias Beyer <mail@beyermatthias.de>2015-08-01 20:46:55 +0200
commitc0f9f07453baeb081a798d4c8fcb5cbe391fbe69 (patch)
tree37806122575115021802eee8ecc3f282380460de
parent681c822b635ff2e04fea006fe0feb87c29b4993b (diff)
Add RC variable for tagging flags for tagging in nixpkgs repo on switch command
-rw-r--r--example.rc6
-rwxr-xr-xnix-script1
-rwxr-xr-xnix-script-switch.sh3
3 files changed, 9 insertions, 1 deletions
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"
}