From 4d610f87989a1801980e5191a950b4bf1e0ebd88 Mon Sep 17 00:00:00 2001 From: John Bintz <27256+johnbintz@users.noreply.github.com> Date: Sun, 26 Apr 2020 16:51:55 -0400 Subject: [PATCH] 0.69.2, add an upgrade script --- .ruby-version | 1 + .sandstorm/app-marketing-version | 1 + .sandstorm/sandstorm-files.list | 8 ++--- .sandstorm/sandstorm-pkgdef.capnp | 4 +-- README.md | 6 ++++ bin/upgrade_hugo | 52 +++++++++++++++++++++++++++++++ hugo-version | 2 +- pages/index.vue | 5 +-- 8 files changed, 70 insertions(+), 9 deletions(-) create mode 100644 .ruby-version create mode 100644 .sandstorm/app-marketing-version create mode 100755 bin/upgrade_hugo diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..5154b3f --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.6 diff --git a/.sandstorm/app-marketing-version b/.sandstorm/app-marketing-version new file mode 100644 index 0000000..cba0932 --- /dev/null +++ b/.sandstorm/app-marketing-version @@ -0,0 +1 @@ +0.69.2~2020-04-26 diff --git a/.sandstorm/sandstorm-files.list b/.sandstorm/sandstorm-files.list index 10964fc..41fc5c3 100644 --- a/.sandstorm/sandstorm-files.list +++ b/.sandstorm/sandstorm-files.list @@ -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 diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index aa6053e..f33ece3 100644 --- a/.sandstorm/sandstorm-pkgdef.capnp +++ b/.sandstorm/sandstorm-pkgdef.capnp @@ -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. diff --git a/README.md b/README.md index a6c8800..062d388 100644 --- a/README.md +++ b/README.md @@ -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 `. +* Follow the directions. diff --git a/bin/upgrade_hugo b/bin/upgrade_hugo new file mode 100755 index 0000000..1c83460 --- /dev/null +++ b/bin/upgrade_hugo @@ -0,0 +1,52 @@ +#!/usr/bin/env ruby + +require 'httparty' +require 'time' + +version = ARGV[0] + +unless version + puts "Usage: #{$0} " + + 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 diff --git a/hugo-version b/hugo-version index a868f07..9cefff0 100644 --- a/hugo-version +++ b/hugo-version @@ -1 +1 @@ -0.69.1 +0.69.2 diff --git a/pages/index.vue b/pages/index.vue index eb89ed7..c947422 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -66,7 +66,7 @@ your config.toml file:
 [markup.goldmark.renderer]
-unsafe= true
+unsafe = true
 
  • @@ -77,7 +77,8 @@ unsafe= true

    Be sure to read through the Hugo release notes - 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.

    Admin Interface (Cloud Commander)

    Commit & publish local changes