diff options
-rw-r--r-- | .version_src | 1 | ||||
-rw-r--r-- | Makefile | 16 | ||||
-rw-r--r-- | update.rb | 6 |
3 files changed, 20 insertions, 3 deletions
diff --git a/.version_src b/.version_src new file mode 100644 index 000000000000..aac61dbfb2a5 --- /dev/null +++ b/.version_src @@ -0,0 +1 @@ +20.7.96 → 20.7.96
\ No newline at end of file @@ -1,12 +1,26 @@ default: build -build: clean 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 bdaac6f4c29b..4df701a584f2 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 |