Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 50 lines (34 sloc) 1 KB
#!/usr/bin/env ruby
require 'time'
system("bin/cleanup_dokuwiki")
tag = ARGV[0]
unless tag
puts "Usage: #{$0} <tag>"
exit 1
end
Dir.chdir "dokuwiki" do
system("git fetch")
system("git checkout #{tag}")
if $? != 0
puts "Tag not found!"
exit 1
end
end
puts "#{tag} exists, updating files"
today = Time.now.strftime('%Y-%m-%d')
version = tag.gsub(/^release_(stable|candidate)_/, '')
File.open('.sandstorm/app-marketing-version', 'w') { |fh| fh.puts "#{version}~#{today}" }
lines = File.readlines('.sandstorm/sandstorm-pkgdef.capnp')
lines = lines.map do |line|
next line unless line['appVersion']
line.gsub(/= ([0-9]+),/) { |m| "= #{$1.to_i + 1}," }
end
File.open('.sandstorm/sandstorm-pkgdef.capnp', 'w') { |fh| fh.print lines.join }
puts "Now:"
puts
puts "vagrant-spk vm destroy"
puts "vagrant-spk vm up"
puts "vagrant-spk dev to Test locally"
puts "vagrant-spk pack ../dokuwiki-sandstorm-#{version}.pkg"
puts "Test upgrade"
puts "vagrant-spk publish ../dokuwiki-sandstorm-#{version}.pkg"