diff options
-rw-r--r-- | Makefile | 18 | ||||
-rw-r--r-- | update.rb | 6 |
2 files changed, 20 insertions, 4 deletions
@@ -1,12 +1,26 @@ -default: clean build +default: build -build: namcap +prep: clean namcap rm -rf Gemfile.lock bundle install + # Fetches latest version info, updates + # PKGBUILD, and creates a .commit_msg bundle exec ruby update.rb + +build: prep makepkg makepkg --printsrcinfo > .SRCINFO +# .commit_msg is created by update.rb, +# if there is a new version. +commit: .commit_msg + echo "Committing: " + cat .commit_msg + git add .SRCINFO + git add PKGBUILD + git commit -S -s -F .commit_msg + rm .commit_msg + clean: git clean -fd rm -rf pkg src *.deb *.tar.xz diff --git a/update.rb b/update.rb index 0ec5f1e8a2a4..1108a39e6747 100644 --- a/update.rb +++ b/update.rb @@ -13,11 +13,13 @@ artifact = Mixlib::Install.new(options).artifact_info pkgbuild = File.read("PKGBUILD") pkgbuild.split("\n").each do |line| if line =~ /pkgver=(.*)/ - puts "#{$1} → #{artifact.version}" if $1 == artifact.version - puts "This version is already current!" + puts "#{$1}: This version is already current!" exit 1 end + File.open(".commit_msg", "w") do |f| + f.write("#{$1} → #{artifact.version}") + end break end end |