From c31ad70b13d6c7d31e59e82dfd0d07ef884e3549 Mon Sep 17 00:00:00 2001 From: David McArthur Date: Fri, 16 Aug 2024 18:25:46 +0100 Subject: [PATCH] debug --- .github/workflows/publish.yml | 2 +- docs/src/app.tsx | 52 +++++++++++++++-------------------- docs/vite.config.ts | 1 - 3 files changed, 23 insertions(+), 32 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2942e25..587604b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -127,7 +127,7 @@ jobs: with: node-version: lts/* - run: npm ci - - run: npm run build + - run: VITE_ISOS_VERSION=${{ needs.version-check.outputs.version }} npm run build -- --base /isos/ - uses: actions/upload-pages-artifact@v3 with: path: ./docs/dist diff --git a/docs/src/app.tsx b/docs/src/app.tsx index c63d803..cb55983 100644 --- a/docs/src/app.tsx +++ b/docs/src/app.tsx @@ -1,55 +1,47 @@ import './app.css'; -// https://github.com/dmca-glasgow/isos/releases/download/v0.0.17/isos_x64.app.tar.gz -// https://github.com/dmca-glasgow/isos/releases/download/v0.0.17/isos_aarch64.app.tar.gz -// https://github.com/dmca-glasgow/isos/releases/download/v0.0.17/isos_0.0.17_x64-setup.nsis.zip -// https://github.com/dmca-glasgow/isos/releases/download/v0.0.17/isos_0.0.17_amd64.AppImage.tar.gz - const version = window.__ENV__.VITE_ISOS_VERSION; +const macArmInstallerName = `isos_installer_mac_${version}_aarch64.dmg`; +const macIntelInstallerName = `isos_installer_mac_${version}_x64.dmg`; +const windowsInstallerName = `isos_installer_win_${version}_x64-setup.exe`; +const linuxInstallerName = `isos_installer_nix_${version}_amd64.AppImage`; + +const macArmInstallerLabel = `ISOS installer for Mac (Apple Silicon)`; +const macIntelInstallerLabel = `ISOS installer for Mac (Intel)`; +const windowsInstallerLabel = `ISOS installer for Windows`; +const linuxInstallerLabel = `ISOS installer for Linux (cross-distribution AppImage)`; + export function App() { return ( <>

ISOS downloads

); } -type LinkProps = { - label: string; - fileName: string; -}; - -function DownloadLink({ label, fileName }: LinkProps) { - return {label}; -} - function createHref(fileName: string, version: string) { return `https://github.com/dmca-glasgow/isos/releases/download/v${version}/${fileName}`; } diff --git a/docs/vite.config.ts b/docs/vite.config.ts index cf3cbe1..019d219 100644 --- a/docs/vite.config.ts +++ b/docs/vite.config.ts @@ -3,6 +3,5 @@ import { defineConfig } from 'vite'; // https://vitejs.dev/config/ export default defineConfig({ - base: '/isos/', plugins: [preact()], });