diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2015-07-28 20:24:45 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2015-08-01 20:46:37 +0200 |
commit | 681c822b635ff2e04fea006fe0feb87c29b4993b (patch) | |
tree | 973167b18ecc7b3284daac6f9868e9549a3288e6 | |
parent | b213b8967c5657992c4f1d344afa32f72753ffb3 (diff) |
Add default tagging flags in switch command
-rw-r--r-- | example.rc | 12 | ||||
-rwxr-xr-x | nix-script | 1 | ||||
-rwxr-xr-x | nix-script-switch.sh | 4 |
3 files changed, 15 insertions, 2 deletions
@@ -16,3 +16,15 @@ RC_CONFIG=~/config # RC_NIXPKGS=~/nixpkgs + +# +# +# Command: switch +# +# + +# +# default flags for git-tagging when doing nix-script switch +# +RC_SWITCH_DEFAULT_TAG_FLAGS="-a" + @@ -121,6 +121,7 @@ then RC_CONFIG="" RC_NIXPKGS="" + RC_SWITCH_DEFAULT_TAG_FLAGS="" else source $RC fi diff --git a/nix-script-switch.sh b/nix-script-switch.sh index ffc0cac..b6e8a2b 100755 --- a/nix-script-switch.sh +++ b/nix-script-switch.sh @@ -16,7 +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. (default: '$RC_NIXPKGS') - -f <tag-flags> Flags for git-tag (see 'git tag --help') + -f <tag-flags> Flags for git-tag (see 'git tag --help') (default: '$RC_SWITCH_DEFAULT_TAG_FLAGS') -b Do not call nixos-rebuild at all. -h Show this help and exit @@ -53,7 +53,7 @@ WD=$RC_CONFIG TAG_NAME= HOSTNAME="$(hostname)" NIXPKGS=$RC_NIXPKGS -TAG_FLAGS="" +TAG_FLAGS="$RC_SWITCH_DEFAULT_TAG_FLAGS" DONT_BUILD= while getopts "c:w:t:nbp:f:h" OPTION |