git.lirion.de

Of git, get, and gud

summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authormail_redacted_for_web 2018-04-07 11:59:18 +0200
committermail_redacted_for_web 2018-05-11 22:28:40 +0200
commit415a71dd59c17093684efd3a1376afe1bfb8824d (patch)
tree621ea5da815e893a200d825e31f6eabdf813e223 /scripts
parent211ecc58b5b650ed158f0c36158a85a289ce2640 (diff)
downloadcontrol-repo-template-415a71dd59c17093684efd3a1376afe1bfb8824d.tar.bz2
Remove code dead for more than 2 years
r10k generates a .r10k-deploy.json file since version 2.1.0 which was released on October 28, 2015. New users of the control-repo are not likely to have a so old version of r10k, so remove this dead code.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/config_version.rb24
-rwxr-xr-xscripts/config_version.sh7
2 files changed, 1 insertions, 30 deletions
diff --git a/scripts/config_version.rb b/scripts/config_version.rb
deleted file mode 100644
index 5652226..0000000
--- a/scripts/config_version.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-begin
- require 'rugged'
- require 'socket'
-rescue LoadError
- t = Time.new
- puts t.to_i
-else
- environmentpath = ARGV[0]
- environment = ARGV[1]
-
- # Get the hostname of the Puppet master compiling the catalog.
- # Sometimes the hostname is the fqdn, so we'll take the first segment.
- compiling_master = Socket.gethostname.split('.').first
-
- # Get the path to the environment being compiled.
- repo = Rugged::Repository.discover(File.join(environmentpath, environment))
- head = repo.head
-
- # First 12 characters of the sha1 hash of the newest commit.
- commit_id = head.target_id[0...11]
-
- # Show the compiling master, environment name, and commit ID.
- puts "#{compiling_master}-#{environment}-#{commit_id}"
-end
diff --git a/scripts/config_version.sh b/scripts/config_version.sh
index 7ccd2f4..1dc54f7 100755
--- a/scripts/config_version.sh
+++ b/scripts/config_version.sh
@@ -6,14 +6,9 @@ if [ $# -ne 2 -o ! -d "$1" -o ! -d "$1/$2" ]; then
fi
ruby=ruby
-script="$1/$2/scripts/config_version.rb"
if [ -x /opt/puppetlabs/puppet/bin/ruby ]; then
ruby=/opt/puppetlabs/puppet/bin/ruby
fi
-if [ -e $1/$2/.r10k-deploy.json ]; then
- script="$1/$2/scripts/code_manager_config_version.rb"
-fi
-
-"${ruby}" "${script}" "$1" "$2"
+"${ruby}" "$1/$2/scripts/code_manager_config_version.rb" "$1" "$2"