diff options
author | Marc A. Paradise | 2020-07-28 11:22:38 -0400 |
---|---|---|
committer | Marc A. Paradise | 2020-07-28 11:22:38 -0400 |
commit | 1a0fc8c3cf168658109537f8034436ad9099ea24 (patch) | |
tree | 0299e30e370ec7afda641b6be7887af8454dbd6b | |
parent | 7664a5994d102e8320291073bb925c42aac13a13 (diff) | |
download | aur-1a0fc8c3cf168658109537f8034436ad9099ea24.tar.gz |
Automate the git bits too
Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
-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 |