Skip to content

Commit

Permalink
Merge pull request #612 from GiovanH/develop
Browse files Browse the repository at this point in the history
2.5.2 -> 2.5.6
  • Loading branch information
GiovanH authored Oct 4, 2024
2 parents c981b0b + 2a89520 commit 1098e5a
Show file tree
Hide file tree
Showing 19 changed files with 295 additions and 95 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
ref: develop
- name: TODO to Issue
id: todo
uses: alstr/todo-to-issue-action@v2.0
uses: alstr/todo-to-issue-action@v5.0
with:
REPO: ${{ github.repository }}
BEFORE: ${{ github.event.before }}
Expand Down
73 changes: 73 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,76 @@ git-future:
git merge $branch
git commit || :
done

xml_release:
#!/bin/bash
gh release view --json tagName,publishedAt,url,body \
| yq -p json -o xml '
{"release": {
"+@version": (.tagName | sub("v", "")),
"+@type": "stable",
"+@date": (.publishedAt),
"url": .url,
"description": "<p>" + .body + "</p>"}
}'

flatpak:
#!/bin/bash
. ~/.bashrc

release_tag="$(
gh release list \
--limit 1 --exclude-drafts --exclude-pre-releases \
--json tagName | jq -r .[0].tagName
)"
version_semver="$(echo $release_tag | tr -d v)"
logparam "Latest release is" "$release_tag" "(" "$version_semver" ")"

json_release=$(
gh release view $release_tag --json assets \
| jq -r '
.assets
| map(select(.url | endswith(".tar.gz")))
[0]
'
)

# commit_hash="$(git rev-list -n 1 $release_tag)"
# logparam "Release tag" "$release_tag" "has commit hash" "$commit_hash"

commit_hash="$(git rev-parse origin-gio/develop)"
logparam "Develop head (w/ metadata) has commit hash" "$commit_hash"

tarurl="$(echo $json_release | jq -r .url)"

tar_tmp="$(mktemp)"
wget "$tarurl" -O "$tar_tmp"
sha="$(cat "$tar_tmp" | sha256sum | cut -d' ' -f1)"

logparam "Tarball is" "$tarurl" "with sha" "$sha"
rm "$tar_tmp"

logmajor "Updating flathub repo"
git_clone_or_update git@github.com:flathub/dev.bambosh.UnofficialHomestuckCollection.git
cd dev.bambosh.UnofficialHomestuckCollection

flat_branch="update-$release_tag"
logparam "Creating new working branch" "$flat_branch"
git checkout -b "$flat_branch"

j2 ../build/dev.bambosh.UnofficialHomestuckCollection.yml.j2 \
--data '{
"pkgver": "'$version_semver'",
"asset_url": "'$tarurl'",
"asset_sha": "'$sha'",
"commit_hash": "'$commit_hash'"
}' \
--print > dev.bambosh.UnofficialHomestuckCollection.yml

git --no-pager diff
confirm

git add dev.bambosh.UnofficialHomestuckCollection.yml
git commit -m "Automatic version update"
git push --set-upstream origin "$flat_branch"
gh pr create --title "Automatic version update to $release_tag" --body ""
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,17 @@ src/imods.tar.gz: $(wildcard src/imods/*) $(wildcard src/imods/*/*)

## Running live

# Run 'SERVE_FLAGS="--reset-last-version" make src/imods.tar.gz test' to make imods and pass --reset-last-version through
# Run 'rm src/imods.tar.gz; SERVE_FLAGS="--reset-last-version" make src/imods.tar.gz test' to make imods and pass --reset-last-version through
.PHONY: test
test: install src/imods.tar.gz
yarn run vue-cli-service electron:serve $(SERVE_FLAGS)
# yarn dev

.PHONY: itest
itest:
-rm src/imods.tar.gz
SERVE_FLAGS="--reset-last-version" make src/imods.tar.gz test

## Building output

.PHONY: build
Expand Down
10 changes: 10 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Release procedure

Notes for maintaining repository release cadence:

1. Update version number in `package.json`. (Must at least bump patch version.)
2. Merge update into develop (for prerelease) or master (for full release) to trigger build workflow.
3. Write release notes and publish the draft release created by the workflow
4. Update flatpak metadata info (see `just xml_release`)
5. Commit updated flatpak metadata to `origin/develop`
6. Create pull request against flatpak repo (`see just flatpak`) using latest gh release for the asset and the latest `origin/develop` metadata for release notes.
36 changes: 19 additions & 17 deletions build/dev.bambosh.UnofficialHomestuckCollection.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<component type="desktop">
<id>dev.bambosh.UnofficialHomestuckCollection</id>
<name>The Unofficial Homestuck Collection</name>
<summary>An offline collection of Homestuck and its related works</summary>
<summary>Offline collection of Homestuck and its related works</summary>
<developer_name>Bambosh</developer_name>
<developer_name>GiovanH</developer_name>
<launchable type="desktop-id">dev.bambosh.UnofficialHomestuckCollection.desktop</launchable>
Expand All @@ -15,16 +15,18 @@
<screenshots>
<screenshot type="default">
<caption>Collection interface</caption>
<image type="source" width="998" height="900">
https://bambosh.dev/unofficial-homestuck-collection/images/collection.gif</image>
<image type="source" width="998" height="900">https://homestuck.giovanh.com/unofficial-homestuck-collection/images/collection.gif</image>
</screenshot>
<screenshot>
<caption>Bandcamp interface</caption>
<image type="source" width="1015" height="708">
https://bambosh.dev/unofficial-homestuck-collection/images/bandcamp.gif</image>
<caption>Bandcamp support</caption>
<image type="source" width="1015" height="708">https://homestuck.giovanh.com/unofficial-homestuck-collection/images/bandcamp.gif</image>
</screenshot>
</screenshots>
<releases>
<release version="2.5.2" type="stable" date="2024-07-29T00:13:49Z">
<url>https://github.com/GiovanH/unofficial-homestuck-collection/releases/tag/v2.5.2</url>
<description><p>Bugfix to fix https://github.com/GiovanH/unofficial-homestuck-collection/issues/601. Promoted to full release 2024-08-24</p></description>
</release>
<release version="2.5.1" date="2024-07-10" type="stable">
<url>https://github.com/GiovanH/unofficial-homestuck-collection/releases/tag/v2.5.1</url>
<description>
Expand All @@ -41,18 +43,18 @@
<url>https://github.com/Bambosh/unofficial-homestuck-collection/releases/tag/v2.0.5</url>
<description>
<p>Features</p>
<p>Fixes</p>
<ul>
<li>Option to use native window decorations - by @GiovanH in #267</li>
<li>Genericise notification behavior for mods - by @GiovanH in #283</li>
<li>Dragging images now displays a preview of the image, instead of the placeholder
captcha card - by @GiovanH in #316</li>
<li>Several new context menu options, including "Copy Image" - by @GiovanH in #317</li>
<li>Several new context menu options, including &#34;Copy Image&#34; - by @GiovanH in #317</li>
</ul>
<p>Fixes</p>
<ul>
<li>Crash that occurred when upgrading from a previous version of the collection - by
@GiovanH in #285</li>
<li>Some cases where new reader progress wouldn't update correctly - by @GiovanH in #282</li>
<li>Some cases where new reader progress wouldn&#39;t update correctly - by @GiovanH in #282</li>
<li>A local IP address being displayed with the path of certain images - by @Bambosh in
#326</li>
<li>Some HQ flashes with double &amp; incorrectly linked scarecrowking images in the news
Expand All @@ -64,7 +66,7 @@
<url>https://github.com/Bambosh/unofficial-homestuck-collection/releases/tag/2.0.4</url>
<description>
<p>Known Issue: If you delete the old Asset Pack V1 before launching version 2.0 of the
program for the first time, you'll get a javascript error. This can be avoided by deleting
program for the first time, you&#39;ll get a javascript error. This can be avoided by deleting
Asset Pack V1 after setting up version 2.0, or you can recover from the problem by
deleting your %appdata%/unofficial-homestuck-collection folder.</p>
</description>
Expand All @@ -85,7 +87,7 @@
<li>Steam links now open in the client if you have it installed (thanks @leo60228).</li>
<li>Added context menu option to search highlighted text in Google.</li>
<li>Altered a credit that was deadnaming Gankra.</li>
<li>Fixed Ascend's track commentary being cut off.</li>
<li>Fixed Ascend&#39;s track commentary being cut off.</li>
<li>A whole lot of UI fixes and polish.</li>
</ul>
</description>
Expand All @@ -94,15 +96,15 @@
<url>https://github.com/Bambosh/unofficial-homestuck-collection/releases/tag/V1.0.0</url>
<description>
<p>This is the initial release of The Unofficial Homestuck Collection!</p>
<p>Requires V1 of the Asset Pack to function. You'll have to find it elsewhere, sorry! Once
you've got it downloaded, you'll have to tell the application where to find it during the
initial startup process. After that, you're set!</p>
<p>Requires V1 of the Asset Pack to function. You&#39;ll have to find it elsewhere, sorry! Once
you&#39;ve got it downloaded, you&#39;ll have to tell the application where to find it during the
initial startup process. After that, you&#39;re set!</p>
</description>
</release>
</releases>
<url type="homepage">https://bambosh.dev/unofficial-homestuck-collection/</url>
<url type="homepage">https://homestuck.giovanh.com/unofficial-homestuck-collection/</url>
<url type="bugtracker">https://github.com/Bambosh/unofficial-homestuck-collection/issues</url>
<url type="faq">https://bambosh.dev/unofficial-homestuck-collection/faq.html</url>
<url type="faq">https://homestuck.giovanh.com/unofficial-homestuck-collection/faq.html</url>
<url type="vcs-browser">https://github.com/Bambosh/unofficial-homestuck-collection</url>
<categories>
<category>Game</category>
Expand All @@ -125,9 +127,9 @@
</content_rating>
<keywords>
<keyword>homestuck</keyword>
<keyword>andrew hussie</keyword>
<keyword>mspa</keyword>
<keyword>ms paint adventures</keyword>
<keyword>andrew hussie</keyword>
<keyword>flash</keyword>
</keywords>
</component>
46 changes: 46 additions & 0 deletions build/dev.bambosh.UnofficialHomestuckCollection.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
app-id: dev.bambosh.UnofficialHomestuckCollection
runtime: org.freedesktop.Platform
runtime-version: "23.08"
sdk: org.freedesktop.Sdk
base: org.electronjs.Electron2.BaseApp
base-version: "23.08"
command: unofficial-homestuck-collection
separate-locales: false
finish-args:
- --share=ipc
- --socket=x11
- --socket=pulseaudio
- --share=network
- --device=dri
- --filesystem=home
build-options:
env:
pkgver: {{ pkgver }}
modules:
- name: unofficial-homestuck-collection
buildsystem: simple
builddir: true
build-commands:
- tar -xf unofficial-homestuck-collection-*.tar.gz
- rm unofficial-homestuck-collection-*.tar.gz
- cp -ar unofficial-homestuck-collection-${pkgver} ${FLATPAK_DEST}/unofficial-homestuck-collection
- |
for i in 16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512; do
install -Dm644 build/icons/$i.png /app/share/icons/hicolor/$i/apps/dev.bambosh.UnofficialHomestuckCollection.png
done
- install -Dm644 build/dev.bambosh.UnofficialHomestuckCollection.metainfo.xml /app/share/metainfo/dev.bambosh.UnofficialHomestuckCollection.metainfo.xml
- install -Dm644 build/dev.bambosh.UnofficialHomestuckCollection.desktop /app/share/applications/dev.bambosh.UnofficialHomestuckCollection.desktop
- install -Dm755 unofficial-homestuck-collection ${FLATPAK_DEST}/bin
sources:
- type: file
url: "{{ asset_url }}"
sha256: "{{ asset_sha }}"
# Required for icons, desktop file and appstream file
- type: git
url: https://github.com/GiovanH/unofficial-homestuck-collection.git
commit: "{{ commit_hash }}"
# Wrapper to launch the app
- type: script
dest-filename: unofficial-homestuck-collection
commands:
- zypak-wrapper.sh /app/unofficial-homestuck-collection/unofficial-homestuck-collection --disable-gpu-sandbox "$@"
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
}
],
"engines": {
"node": ">= 18.20"
"node": "18.20"
},
"version": "2.5.1",
"version": "2.5.6",
"license": "GPL-3.0",
"repository": "github:Bambosh/unofficial-homestuck-collection",
"private": true,
Expand Down
11 changes: 11 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,17 @@
webFrame.setZoomLevel(this.zoomLevel)
}
},
archiveReload() {
this.memoizedClearAll()
this.$root.loadState = "LOADING"
this.$nextTick(function () {
// Don't show loading screen, "soft" reload
// this.$root.loadState = "LOADING"
this.$localData.root.applySaveIfPending()
ipcRenderer.send('RELOAD_ARCHIVE_DATA')
})
},
openJumpbox() {
if (this.$localData.settings.showAddressBar) {
document.querySelector('#jumpBox input').select()
Expand Down
11 changes: 1 addition & 10 deletions src/components/AppMenu/TabBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -298,16 +298,7 @@ export default {
ipcRenderer.invoke('reload')
},
archiveReload(){
// Should match settings.archiveReload
this.memoizedClearAll()
this.$root.loadState = "LOADING"
this.$nextTick(function () {
// Don't show loading screen, "soft" reload
// this.$root.loadState = "LOADING"
this.$localData.root.applySaveIfPending()
ipcRenderer.send('RELOAD_ARCHIVE_DATA')
})
this.$root.app.archiveReload()
}
}
}
Expand Down
Loading

0 comments on commit 1098e5a

Please sign in to comment.