From 968367c434839ea1f442ac7b684d6c153311b8a4 Mon Sep 17 00:00:00 2001 From: John Bintz <27256+johnbintz@users.noreply.github.com> Date: Tue, 31 May 2022 23:07:07 -0400 Subject: [PATCH] 0.100.0 --- .sandstorm/app-marketing-version | 2 +- .sandstorm/sandstorm-pkgdef.capnp | 2 +- bin/test_hugo | 14 +++++++++++-- bin/upgrade_hugo | 33 +++++++++++++++++++++---------- hugo-version | 2 +- 5 files changed, 38 insertions(+), 15 deletions(-) diff --git a/.sandstorm/app-marketing-version b/.sandstorm/app-marketing-version index 201ed3f..30d3427 100644 --- a/.sandstorm/app-marketing-version +++ b/.sandstorm/app-marketing-version @@ -1 +1 @@ -0.99.1~2022-05-25 +0.100.0~2022-05-31 diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index d8ce9fe..4673bec 100644 --- a/.sandstorm/sandstorm-pkgdef.capnp +++ b/.sandstorm/sandstorm-pkgdef.capnp @@ -19,7 +19,7 @@ const pkgdef :Spk.PackageDefinition = ( appTitle = (defaultText = "Hugo"), - appVersion = 39, # Increment this for every release. + appVersion = 44, # Increment this for every release. appMarketingVersion = (defaultText = (embed "app-marketing-version")), # Human-readable representation of appVersion. Should match the way you diff --git a/bin/test_hugo b/bin/test_hugo index 823990b..52c0be3 100755 --- a/bin/test_hugo +++ b/bin/test_hugo @@ -1,5 +1,7 @@ #!/bin/bash +build_only=$1 + cd .sandstorm vagrant destroy -f cd .. @@ -11,8 +13,16 @@ vagrant-spk vm up vagrant-spk vm halt vagrant-spk vm up -xdg-open http://local.sandstorm.io:6090/ -vagrant-spk dev +if [[ $build_only == "--build-only" ]]; then + echo "Building for packing only, no web browser will open!" + vagrant-spk dev & pid=$! + # 5 minutes should be enough time... + sleep 600 + kill -INT $pid +else + xdg-open http://local.sandstorm.io:6090/ + vagrant-spk dev +fi echo "If everything went well:" echo diff --git a/bin/upgrade_hugo b/bin/upgrade_hugo index 5488142..7a59a3b 100755 --- a/bin/upgrade_hugo +++ b/bin/upgrade_hugo @@ -4,9 +4,10 @@ require 'httparty' require 'time' version = ARGV[0] +also_pack = ARGV[1] unless version - puts "Usage: #{$0} " + puts "Usage: #{$0} --also-pack" exit 1 end @@ -16,7 +17,7 @@ verify_url = "https://github.com/gohugoio/hugo/releases/download/v#{version}/hug response = HTTParty.get(verify_url) unless response.code >= 200 && response.code < 300 - puts "Error verifying release exists!" + puts 'Error verifying release exists!' puts " URL checked: #{verify_url}" puts " Response code: #{response.code}" exit 1 @@ -34,17 +35,29 @@ 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}," } + line.gsub(/= ([0-9]+),/) { |_m| "= #{Regexp.last_match(1).to_i + 1}," } end File.open('.sandstorm/sandstorm-pkgdef.capnp', 'w') { |fh| fh.print lines.join } -puts <<-TXT +if also_pack == '--also-pack' + system 'bin/test_hugo --build-only' + system 'bin/pack_hugo' -Now do this: + puts <<~TXT -* bin/test_hugo -* Test fresh install -* vagrant-spk pack ../hugo-sandstorm.spk -* Test upgrade install -TXT + Now do this: + + * Test fresh and upgrade install + TXT +else + puts <<~TXT + + Now do this: + + * bin/test_hugo + * Test fresh install + * bin/pack_hugo + * Test upgrade install + TXT +end diff --git a/hugo-version b/hugo-version index 626c498..897e215 100644 --- a/hugo-version +++ b/hugo-version @@ -1 +1 @@ -0.99.1 +0.100.0