diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-03-19 17:52:44 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-03-19 17:52:44 +0100 |
commit | 3897ff83b6848e4169f1641b1132714870f01801 (patch) | |
tree | 5afcddd6543ceb0109db77156a6d9d452689c0a1 /mach | |
parent | Added build script (diff) | |
download | smolbote-3897ff83b6848e4169f1641b1132714870f01801.tar.xz |
Updated BUILDING.md
mach script can now build tarballs
Diffstat (limited to 'mach')
-rwxr-xr-x | mach | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -7,7 +7,8 @@ options = { :settings => "#{ENV['HOME']}/.config/QtProject/qbs/1.7.1", :profile => 'qt5', :buildDir => '../build', - :installDir => '/usr/local' + :installDir => '/usr/local', + :email => 'xian.nox@gmail.com' } OptionParser.new do |opts| @@ -16,7 +17,7 @@ OptionParser.new do |opts| opts.on("-h", "--help", "Prints this help") do puts opts puts "Options: #{options}" - puts 'Commands: build, install' + puts 'Commands: run, clean, build, install, tarball' exit end @@ -37,10 +38,20 @@ end.parse! if not ARGV.empty? then ARGV.each do|arg| case arg + when 'run' + system "qbs run -d #{options[:buildDir]} -p poi profile:#{options[:profile]} release" + when 'clean' + system "qbs clean -d #{options[:buildDir]} profile:#{options[:profile]} release" when 'build' - system "qbs build -d #{options[:buildDir]} profile:#{options[:profile]} release" + system "qbs build -d #{options[:buildDir]} --force-probe-execution profile:#{options[:profile]} release" when 'install' - system "sudo qbs install -d #{options[:buildDir]} --install-root #{options[:installDir]} --settings-dir #{options[:settings]} profile:#{options[:profile]} release" + system "sudo qbs install -d #{options[:buildDir]} --no-build --install-root #{options[:installDir]} --settings-dir #{options[:settings]} profile:#{options[:profile]} release" + when 'tarball' + filename = "smolbote-#{`git describe --tags`}.tar.lz".gsub("\n", '') + system "tar -I\"lzip -9\" -cf #{filename} --directory=#{options[:buildDir]}/release/install-root . --owner=user:1000 --group=users:1000" + system "gpg -u #{options[:email]} -b #{filename}" + system "gpg -u #{options[:email]} -b --armor #{filename}" + system "sha512sum --binary #{filename}* > #{filename}.sha512" else puts "Unknown argument #{a}; use ./mach -h for more details" end |