Skip to content

Commit

Permalink
Resolve command-line option for latest version of snapcraft
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Dec 26, 2023
1 parent 0d58ee7 commit 5b2a557
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Rakefile
Expand Up @@ -3,6 +3,7 @@ require 'fileutils'

versions = File.read("versions.txt").split
tracks = versions.map{|v| v.split(".")[0..1].join(".") }
archs = %w[amd64 arm64 armhf]

task :build do
versions.each do |v|
Expand All @@ -14,13 +15,15 @@ task :build do
yml = ERB.new(File.read("snap/local/snapcraft.yaml.erb")).result(binding)
File.open("snap/snapcraft.yaml", "w") {|f| f.puts yml }

system "snapcraft remote-build --build-on=amd64,arm64,armhf --launchpad-accept-public-upload"
archs.each do |arch|
system "snapcraft remote-build --build-for=#{arch} --launchpad-accept-public-upload"
end
end
end

task :push do
versions.each do |v|
%w[amd64 arm64 armhf].each do |arch|
archs.each do |arch|
system "snapcraft push ruby_#{v}_#{arch}.snap"
end
end
Expand Down

0 comments on commit 5b2a557

Please sign in to comment.