diff options
| author | 2026-02-25 13:09:16 +0800 | |
|---|---|---|
| committer | 2026-02-25 13:09:16 +0800 | |
| commit | 69ce69412bf41fdff5582f4d4f8ac5df4d394c2e (patch) | |
| tree | 50da19a0ba4f2b9c76356c83e1139a1c113132f3 /scripts | |
| parent | 26f299f1e2da116a8702a87e887e17ba3f822d64 (diff) | |
| download | DropOut-69ce69412bf41fdff5582f4d4f8ac5df4d394c2e.tar.gz DropOut-69ce69412bf41fdff5582f4d4f8ac5df4d394c2e.zip | |
fix(aur): fix aur version rule
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/release-aur.ts | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/release-aur.ts b/scripts/release-aur.ts index 9cdef28..ed75aca 100644 --- a/scripts/release-aur.ts +++ b/scripts/release-aur.ts @@ -9,11 +9,13 @@ import { import path from "node:path"; import { version as pkgver } from "../src-tauri/tauri.conf.json"; -function getSHA256Sum(url: string) { - const response = execSync(`curl -L ${url} | sha256sum`); +function getSHA256Sum(filePath: string) { + const response = execSync(`sha256sum ${filePath}`); return response.toString().split(" ")[0]; } +const projectRoot = path.resolve(__dirname, ".."); + execSync("mkdir -p release", { stdio: "inherit" }); process.chdir("release"); @@ -31,7 +33,7 @@ const PKGBUILD = `\ # Maintainer: HsiangNianian <i@jyunko.cn> # Contributor: 苏向夜 <fu050409@163.com> pkgname=dropout-bin -pkgver=${pkgver} +pkgver=${pkgver.replace("-", "_")} pkgrel=1 pkgdesc="A modern, reproducible, and developer-grade Minecraft launcher" arch=('x86_64' 'aarch64') @@ -42,13 +44,14 @@ options=('!strip' '!debug') install=dropout-bin.install source_x86_64=("${x86_64Url}") source_aarch64=("${aarch64Url}") -sha256sums_x86_64=('${getSHA256Sum(x86_64Url)}') -sha256sums_aarch64=('${getSHA256Sum(aarch64Url)}') +sha256sums_x86_64=('${getSHA256Sum(path.resolve(projectRoot, "artifacts/deb", `dropout_${pkgver}_amd64.deb`))}') +sha256sums_aarch64=('${getSHA256Sum(path.resolve(projectRoot, "artifacts/deb", `dropout_${pkgver}_arm64.deb`))}') package() { # Extract package data tar -xvf data.tar.gz -C "\${pkgdir}" } `; +console.log(PKGBUILD); const INSTALL = `\ post_install() { gtk-update-icon-cache -q -t -f usr/share/icons/hicolor @@ -63,6 +66,7 @@ post_remove() { gtk-update-icon-cache -q -t -f usr/share/icons/hicolor update-desktop-database -q }`; +console.log(INSTALL); // Check if AUR_SSH_KEY environment variable is set const AUR_SSH_KEY = process.env.AUR_SSH_KEY; |