diff --git a/.forgejo/workflows/cleanup.yml b/.forgejo/workflows/cleanup.yml deleted file mode 100644 index 48305c8..0000000 --- a/.forgejo/workflows/cleanup.yml +++ /dev/null @@ -1,56 +0,0 @@ -on: - workflow_dispatch: - schedule: - - cron: "30 3 * * *" - -jobs: - cleanup-workflow-runs: - runs-on: docker - steps: - - name: Install Packages - run: apt-get update && apt-get install -y curl jq - - - name: Delete workflow runs older than 14 days - env: - TOKEN: ${{ forgejo.token }} - API: ${{ forgejo.api_url }} - REPO: ${{ forgejo.repository }} - CURRENT_RUN_ID: ${{ forgejo.run_id }} - run: | - set -eu - - CUTOFF="$(date -u -d "14 days ago" +"%Y-%m-%dT%H:%M:%SZ")" - PAGE=1 - DELETE_IDS=delete-workflow-runs.txt - - : > "$DELETE_IDS" - - while :; do - curl -fsS \ - -H "Authorization: token $TOKEN" \ - "$API/repos/$REPO/actions/runs?page=$PAGE&limit=50" \ - -o runs.json - - COUNT="$(jq '.workflow_runs | length' runs.json)" - test "$COUNT" -gt 0 || break - - jq -r \ - --arg cutoff "$CUTOFF" \ - --arg current "$CURRENT_RUN_ID" \ - '.workflow_runs[] - | select((.id | tostring) != $current) - | select(["success", "failure", "cancelled", "skipped", "succeeded", "failed"] | index(.status)) - | select(.created < $cutoff) - | .id' runs.json \ - >> "$DELETE_IDS" - - PAGE="$((PAGE + 1))" - done - - while IFS= read -r run_id; do - test -n "$run_id" || continue - echo "Deleting workflow run $run_id" - curl -fsS -X DELETE \ - -H "Authorization: token $TOKEN" \ - "$API/repos/$REPO/actions/runs/$run_id" - done < "$DELETE_IDS" diff --git a/.forgejo/workflows/deploy-prod.yml b/.forgejo/workflows/deploy-prod.yml index 6adc499..ef210bd 100644 --- a/.forgejo/workflows/deploy-prod.yml +++ b/.forgejo/workflows/deploy-prod.yml @@ -232,46 +232,6 @@ jobs: -F "attachment=@$file" done - - name: Delete dev releases for prod version - env: - TOKEN: ${{ forgejo.token }} - API: ${{ forgejo.api_url }} - REPO: ${{ forgejo.repository }} - TAG: ${{ steps.version.outputs.tag }} - run: | - set -eu - - PAGE=1 - PREFIX="$TAG-dev-" - DELETE_RELEASES=delete-dev-releases.tsv - - : > "$DELETE_RELEASES" - - while :; do - curl -fsS \ - -H "Authorization: token $TOKEN" \ - "$API/repos/$REPO/releases?page=$PAGE&limit=50&pre-release=true" \ - -o releases.json - - COUNT="$(jq 'length' releases.json)" - test "$COUNT" -gt 0 || break - - jq -r \ - --arg prefix "$PREFIX" \ - '.[] | select(.prerelease == true) | select(.tag_name | startswith($prefix)) | [.id, .tag_name] | @tsv' releases.json \ - >> "$DELETE_RELEASES" - - PAGE="$((PAGE + 1))" - done - - while IFS="$(printf '\t')" read -r release_id release_tag; do - test -n "$release_id" || continue - echo "Deleting dev release $release_tag" - curl -fsS -X DELETE \ - -H "Authorization: token $TOKEN" \ - "$API/repos/$REPO/releases/$release_id" - done < "$DELETE_RELEASES" - - name: Update root flake release hash env: TAG: ${{ steps.version.outputs.tag }} diff --git a/apps/electron/build/icons/128x128.png b/apps/electron/build/icons/128x128.png deleted file mode 100644 index 425ffb4..0000000 Binary files a/apps/electron/build/icons/128x128.png and /dev/null differ diff --git a/apps/electron/build/icons/128x128@2x.png b/apps/electron/build/icons/128x128@2x.png deleted file mode 100644 index 9fe4117..0000000 Binary files a/apps/electron/build/icons/128x128@2x.png and /dev/null differ diff --git a/apps/electron/build/icons/32x32.png b/apps/electron/build/icons/32x32.png deleted file mode 100644 index 3c9a880..0000000 Binary files a/apps/electron/build/icons/32x32.png and /dev/null differ diff --git a/apps/electron/build/icons/64x64.png b/apps/electron/build/icons/64x64.png deleted file mode 100644 index 0f9e690..0000000 Binary files a/apps/electron/build/icons/64x64.png and /dev/null differ diff --git a/apps/electron/build/icons/icon.icns b/apps/electron/build/icons/icon.icns deleted file mode 100644 index 7ea0993..0000000 Binary files a/apps/electron/build/icons/icon.icns and /dev/null differ diff --git a/apps/electron/build/icons/icon.ico b/apps/electron/build/icons/icon.ico deleted file mode 100644 index fc67bfb..0000000 Binary files a/apps/electron/build/icons/icon.ico and /dev/null differ diff --git a/apps/electron/build/icons/icon.png b/apps/electron/build/icons/icon.png deleted file mode 100644 index 8e56359..0000000 Binary files a/apps/electron/build/icons/icon.png and /dev/null differ diff --git a/apps/electron/package.json b/apps/electron/package.json index accc2d8..590d97c 100644 --- a/apps/electron/package.json +++ b/apps/electron/package.json @@ -41,7 +41,6 @@ "productName": "Tensamin", "executableName": "tensamin", "artifactName": "Tensamin-${version}-${os}-${arch}.${ext}", - "icon": "build/icons/icon.png", "directories": { "output": "release" }, @@ -53,15 +52,10 @@ { "from": "../web/dist", "to": "web" - }, - { - "from": "build/icons/icon.png", - "to": "icons/icon.png" } ], "linux": { "target": ["AppImage", "deb", "rpm"], - "icon": "build/icons", "executableName": "tensamin", "category": "Network", "maintainer": "Methanium", @@ -73,12 +67,10 @@ } }, "win": { - "target": ["nsis", "portable"], - "icon": "build/icons/icon.ico" + "target": ["nsis", "portable"] }, "mac": { - "target": ["dmg"], - "icon": "build/icons/icon.icns" + "target": ["dmg"] }, "publish": null } diff --git a/apps/electron/src/main/main.ts b/apps/electron/src/main/main.ts index c4ee840..a028573 100644 --- a/apps/electron/src/main/main.ts +++ b/apps/electron/src/main/main.ts @@ -34,12 +34,6 @@ function getRendererIndex() { return join(process.resourcesPath, "web", "index.html"); } -function getWindowIcon() { - if (process.platform === "darwin") return undefined; - if (app.isPackaged) return join(process.resourcesPath, "icons", "icon.png"); - return resolve(__dirname, "../../build/icons/icon.png"); -} - function getPlatform(): DesktopScreenShareCapabilities["platform"] { if (process.platform === "linux") return "linux"; if (process.platform === "darwin") return "macos"; @@ -197,7 +191,6 @@ async function createWindow() { minWidth: 900, minHeight: 600, title: "Tensamin", - icon: getWindowIcon(), frame: false, autoHideMenuBar: true, webPreferences: { diff --git a/apps/tauri/package.json b/apps/tauri/package.json index 91c18bd..77ba3ea 100644 --- a/apps/tauri/package.json +++ b/apps/tauri/package.json @@ -22,7 +22,7 @@ "build:mobile:raw": "tauri android build", "dev:mobile": "if command -v nix >/dev/null 2>&1; then nix develop --command bun dev:mobile:raw; else bun dev:mobile:raw; fi", "build:mobile": "bun run render-version.ts && if command -v nix >/dev/null 2>&1; then nix develop --command bun build:mobile:raw; else bun build:mobile:raw; fi && bun run render-version.ts --unrender", - "gen-icons": "tauri icon ./logo.json && bun scripts/sync-electron-icons.ts", + "gen-icons": "tauri icon ./logo.json", "format": "bunx prettier --write .", "lint": "eslint src" }, diff --git a/apps/tauri/scripts/sync-electron-icons.ts b/apps/tauri/scripts/sync-electron-icons.ts deleted file mode 100644 index db5cc76..0000000 --- a/apps/tauri/scripts/sync-electron-icons.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { copyFile, mkdir } from "node:fs/promises"; -import { dirname, join, resolve } from "node:path"; -import { fileURLToPath } from "node:url"; - -const scriptDir = dirname(fileURLToPath(import.meta.url)); -const tauriDir = resolve(scriptDir, ".."); -const clientDir = resolve(tauriDir, "../.."); -const tauriIconsDir = join(tauriDir, "src-tauri", "icons"); -const electronIconsDir = join(clientDir, "apps", "electron", "build", "icons"); - -const desktopIcons = ["32x32.png", "64x64.png", "128x128.png", "128x128@2x.png", "icon.png", "icon.ico", "icon.icns"]; - -await mkdir(electronIconsDir, { recursive: true }); - -await Promise.all( - desktopIcons.map((icon) => copyFile(join(tauriIconsDir, icon), join(electronIconsDir, icon))), -); - -console.log(`Synced ${desktopIcons.length} desktop icons to ${electronIconsDir}`); diff --git a/apps/tauri/src-tauri/icons/icon.icns b/apps/tauri/src-tauri/icons/icon.icns index 7ea0993..daf2362 100644 Binary files a/apps/tauri/src-tauri/icons/icon.icns and b/apps/tauri/src-tauri/icons/icon.icns differ diff --git a/flake.nix b/flake.nix index 3773515..f847bd6 100644 --- a/flake.nix +++ b/flake.nix @@ -6,8 +6,8 @@ outputs = {nixpkgs, ...}: let systems = ["x86_64-linux"]; forAllSystems = nixpkgs.lib.genAttrs systems; - version = "0.0.6"; - x86_64DebHash = "sha256-rNlyNZFgYVRvJzX1sBz/qLHUdZoyfvHl5xuwb2BtU48="; + version = "0.0.5"; + x86_64DebHash = "sha256-flC62rhhKyE/yRoNZRwXVHn/vwxE/Klxzj8uWhItDkY="; forgejoBaseUrl = "https://git.methanium.net/tensamin/client/releases/download/${version}"; in { packages = forAllSystems (system: let diff --git a/package.json b/package.json index 0c0e2b1..2b634e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tensamin", - "version": "0.0.7", + "version": "0.0.6", "private": true, "workspaces": [ "packages/*", diff --git a/readme.md b/readme.md deleted file mode 100644 index 58c21e6..0000000 --- a/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# Information - -All dev releases between two prod version get deleted upon creation of the latest prod release.