diff options
author | Leo Schwarz | 2017-06-21 17:57:18 +0000 |
---|---|---|
committer | Leo Schwarz | 2017-06-21 17:57:18 +0000 |
commit | c15d6236fce3584ad247ea32265aa6dba3635a42 (patch) | |
tree | a8717c2edd932cafd0092bd48672fe56c028b112 | |
parent | 56f25f46d4364cdaf803b23d052c770a56c5448c (diff) | |
download | aur-c15d6236fce3584ad247ea32265aa6dba3635a42.tar.gz |
Fix updater script.
-rwxr-xr-x | update.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/update.rb b/update.rb index 4cb8e4a908b5..cd35e7dd85e0 100755 --- a/update.rb +++ b/update.rb @@ -26,7 +26,7 @@ def attempt_upgrade(version) # Update PKGBUILD file. pkgbuild = File.read "PKGBUILD" pkgbuild.gsub!(/^pkgver=.*$/, "pkgver=#{version}") - + File.open "PKGBUILD", "w" do |file| file.write pkgbuild end @@ -44,6 +44,7 @@ loop do new_version = "#{v_num}b#{v_patch}" if attempt_upgrade(new_version) + $new_version = new_version success = true else break @@ -51,7 +52,7 @@ loop do end if success - puts "Finishing update to version #{new_version}." + puts "Finishing update to version #{$new_version}." # Clean old files. system "git clean -fx" @@ -64,7 +65,7 @@ if success if ARGV.include? "--publish" puts "Publishing update to AUR." system "git add PKGBUILD .SRCINFO" - system "git commit -m 'Automatic upgrade to version #{FF_VERSION} (#{new_version}).'" + system "git commit -m 'Automatic upgrade to version #{$new_version}.'" system "git push" end else |