Skip to content

Commit

Permalink
Create the 'check update' page, step one. Pipeline add. (#97)
Browse files Browse the repository at this point in the history
* Create the 'check update' page, step one. Pipeline add.

* Update htmls

* More workflow changes
  • Loading branch information
baconpaul authored May 9, 2024
1 parent 872b7c8 commit de83e26
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-daw-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ jobs:
run: |
ls -l ./build/installer
- name: Create Update HTML on Linux
if: runner.os == 'Linux' && github.event_name != `pull_request`
run: |
./scripts/check-update/make-update.sh > ./build/installer/check-updates.html
- name: Upload artifact
uses: actions/upload-artifact@v4
if: github.event_name != 'pull_request'
Expand Down
26 changes: 26 additions & 0 deletions scripts/check-update/check-update.html.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="color-scheme" content="light dark" />
<title>Version Check</title>
<script>
if (window.location.hash !== "HASH") {
window.location.href =
"https://github.com/baconpaul/airwin2rack/releases/tag/DAWPlugin";
}

document.addEventListener("DOMContentLoaded", () => {
document.getElementById("message").innerText =
"Airwindows Consolidated is up to date! HASH is the latest version";
});
</script>
</head>
<body>
<p id="message">You have JavaScript disabled so we don't know if you
are up to date or not. You can find the latest version
<a href="https://github.com/baconpaul/airwin2rack/releases/tag/DAWPlugin">here</a>.
</p>
</body>
</html>
4 changes: 4 additions & 0 deletions scripts/check-update/make-update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

GHASH=`git rev-parse --short HEAD`
sed -e "s/HASH/$GHASH/" scripts/check-update/check-update.html.in

0 comments on commit de83e26

Please sign in to comment.