Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
dmca-glasgow committed Aug 16, 2024
1 parent 8100952 commit c31ad70
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
52 changes: 22 additions & 30 deletions docs/src/app.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<>
<h1>ISOS downloads</h1>
<ul>
<li>
<DownloadLink
label="MacOS (Intel)"
fileName="isos_x64.app.tar.gz"
/>
<a href={createHref(macArmInstallerName, version)}>
{macArmInstallerLabel}
</a>
</li>
<li>
<DownloadLink
label="MacOS (Apple Silicon)"
fileName="isos_aarch64.app.tar.gz"
/>
<a href={createHref(macIntelInstallerName, version)}>
{macIntelInstallerLabel}
</a>
</li>
<li>
<DownloadLink
label="Windows"
fileName={`isos_${version}_x64-setup.nsis.zip`}
/>
<a href={createHref(windowsInstallerName, version)}>
{windowsInstallerLabel}
</a>
</li>
<li>
<DownloadLink
label="Linux"
fileName={`isos_${version}_amd64.AppImage`}
/>
<a href={createHref(linuxInstallerName, version)}>
{linuxInstallerLabel}
</a>
</li>
</ul>
</>
);
}

type LinkProps = {
label: string;
fileName: string;
};

function DownloadLink({ label, fileName }: LinkProps) {
return <a href={createHref(fileName, version)}>{label}</a>;
}

function createHref(fileName: string, version: string) {
return `https://github.com/dmca-glasgow/isos/releases/download/v${version}/${fileName}`;
}
1 change: 0 additions & 1 deletion docs/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ import { defineConfig } from 'vite';

// https://vitejs.dev/config/
export default defineConfig({
base: '/isos/',
plugins: [preact()],
});

0 comments on commit c31ad70

Please sign in to comment.