summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Schwarz2017-06-21 17:57:18 +0000
committerLeo Schwarz2017-06-21 17:57:18 +0000
commitc15d6236fce3584ad247ea32265aa6dba3635a42 (patch)
treea8717c2edd932cafd0092bd48672fe56c028b112
parent56f25f46d4364cdaf803b23d052c770a56c5448c (diff)
downloadaur-c15d6236fce3584ad247ea32265aa6dba3635a42.tar.gz
Fix updater script.
-rwxr-xr-xupdate.rb7
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