]> git.pld-linux.org Git - packages/vagrant.git/commitdiff
inline version string
authorElan Ruusamäe <glen@delfi.ee>
Sun, 4 May 2014 08:12:23 +0000 (11:12 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sun, 4 May 2014 08:28:55 +0000 (11:28 +0300)
vagrant.spec
version.patch [new file with mode: 0644]

index a7eedca0dbe9910ff713cf9f2e64b1366a3246ac..8f671484892d10674323c6d5e30bb1ddd43b38fd 100644 (file)
@@ -3,7 +3,7 @@
 Summary:       Provisioning and deployment of virtual instances
 Name:          vagrant
 Version:       1.5.4
-Release:       0.3
+Release:       0.4
 License:       MIT
 Group:         Applications/Emulators
 Source0:       https://github.com/mitchellh/vagrant/archive/v%{version}/%{name}-%{version}.tar.gz
@@ -12,6 +12,7 @@ Patch0:               source_root.patch
 Patch1:                rubygems.patch
 Patch2:                no-warning.patch
 Patch3:                %{name}file-shell-provision.patch
+Patch4:                version.patch
 URL:           http://www.vagrantup.com/
 BuildRequires: bash
 BuildRequires: rpm-rubyprov
@@ -111,6 +112,10 @@ Ruby documentation for %{gem_name}
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
+
+VERSION=$(cat version.txt)
+sed -i -e "s/__VERSION__/$VERSION/" lib/vagrant/version.rb
 
 # cleanup backups after patching
 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
diff --git a/version.patch b/version.patch
new file mode 100644 (file)
index 0000000..ab6ad89
--- /dev/null
@@ -0,0 +1,10 @@
+--- vagrant-1.5.4/lib/vagrant/version.rb~      2014-04-21 21:50:01.000000000 +0300
++++ vagrant-1.5.4/lib/vagrant/version.rb       2014-05-04 11:10:11.382221217 +0300
+@@ -2,6 +2,5 @@
+   # This will always be up to date with the current version of Vagrant,
+   # since it is used to generate the gemspec and is also the source of
+   # the version for `vagrant -v`
+-  VERSION = File.read(
+-    File.expand_path("../../../version.txt", __FILE__)).chomp
++  VERSION = '__VERSION__'
+ end
This page took 0.088956 seconds and 4 git commands to generate.