0.69.2, add an upgrade script

This commit is contained in:
John Bintz 2020-04-26 16:51:55 -04:00
parent e63f84b044
commit 4d610f8798
8 changed files with 70 additions and 9 deletions

1
.ruby-version Normal file
View File

@ -0,0 +1 @@
2.6

View File

@ -0,0 +1 @@
0.69.2~2020-04-26

View File

@ -90,13 +90,13 @@ lib64/ld-linux-x86-64.so.2
opt/app
opt/app/.babelrc
opt/app/.cloudcmd.menu.js
opt/app/.nuxt/dist/0.nuxt.bundle.aed0810b10ee27bc1f4c.js
opt/app/.nuxt/dist/0.nuxt.bundle.db502cad06541dacbed3.js
opt/app/.nuxt/dist/1.nuxt.bundle.89a9958091c34dcc68ed.js
opt/app/.nuxt/dist/index.html
opt/app/.nuxt/dist/manifest.24786bf1655f163f53d8.js
opt/app/.nuxt/dist/nuxt.bundle.83d0779466233bb9bf53.js
opt/app/.nuxt/dist/manifest.27e0b928a7750aea811d.js
opt/app/.nuxt/dist/nuxt.bundle.217a079b880a04532912.js
opt/app/.nuxt/dist/server-bundle.json
opt/app/.nuxt/dist/vendor.bundle.24786bf1655f163f53d8.js
opt/app/.nuxt/dist/vendor.bundle.27e0b928a7750aea811d.js
opt/app/.sandstorm/launcher.sh
opt/app/README.md
opt/app/hugo-version

View File

@ -19,9 +19,9 @@ const pkgdef :Spk.PackageDefinition = (
appTitle = (defaultText = "Hugo"),
appVersion = 5, # Increment this for every release.
appVersion = 6, # Increment this for every release.
appMarketingVersion = (defaultText = "0.69.1~2020-04-22"),
appMarketingVersion = (defaultText = (embed "app-marketing-version")),
# Human-readable representation of appVersion. Should match the way you
# identify versions of your app in documentation and marketing.

View File

@ -34,3 +34,9 @@ Visit [http://local.sandstorm.io:6080/](http://local.sandstorm.io:6080/) in a we
Note: when you want to fork this repo and create actual app packages for the app
store you would need either the original app key or
[create a new one and make your own version of the app](https://docs.sandstorm.io/en/latest/developing/publishing-apps/).
## Upgrades
* You'll need Ruby 2.6 and `gem install httparty`.
* Run `bin/upgrade_hugo <new version>`.
* Follow the directions.

52
bin/upgrade_hugo Executable file
View File

@ -0,0 +1,52 @@
#!/usr/bin/env ruby
require 'httparty'
require 'time'
version = ARGV[0]
unless version
puts "Usage: #{$0} <version>"
exit 1
end
verify_url = "https://github.com/gohugoio/hugo/releases/download/v#{version}/hugo_#{version}_Linux-64bit.deb"
response = HTTParty.get(verify_url)
unless response.code >= 200 && response.code < 300
puts "Error verifying release exists!"
puts " URL checked: #{verify_url}"
puts " Response code: #{response.code}"
exit 1
end
puts "#{version} exists, updating files"
today = Time.now.strftime('%Y-%m-%d')
File.open('hugo-version', 'w') { |fh| fh.puts version }
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 <<-TXT
Now do this:
* vagrant-spk vm destroy
* vagrant-spk vm up
* vagrant-spk dev
* Test fresh install
* vagrant-spk pack ../hugo-sandstorm.pkg
* Test upgrade install
TXT

View File

@ -1 +1 @@
0.69.1
0.69.2

View File

@ -66,7 +66,7 @@
your <code>config.toml</code> file:
<pre>
[markup.goldmark.renderer]
unsafe= true
unsafe = true
</pre>
</li>
<li>
@ -77,7 +77,8 @@ unsafe= true
</ul>
<p>
Be sure to <a href="https://gohugo.io/news/" target="_blank" rel="noopener">read through the Hugo release notes</a>
if you notice any other odd behavior after upgrading.
if you notice any other odd behavior after upgrading. These notes will
go away after June 1, 2020.
</p>
<h2>Admin Interface (<a href="https://cloudcmd.io/" target="_blank" rel="noopener">Cloud Commander</a>)</h2>
<a :class="{disabled: !dirty}" class="button" @click="commitLocal">Commit &amp; publish local changes</a>