mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-11 13:56:16 +00:00
remove js script
This commit is contained in:
15
.github/workflows/update-aur.yml
vendored
15
.github/workflows/update-aur.yml
vendored
@@ -85,7 +85,20 @@ jobs:
|
||||
- name: Update PKGBUILD and .SRCINFO
|
||||
if: steps.check-update.outputs.update_needed == 'true'
|
||||
run: |
|
||||
node ../scripts/update-pkgver.js "${{ steps.get-version.outputs.version }}" ./PKGBUILD
|
||||
# Update pkgver in PKGBUILD
|
||||
NEW_VERSION="${{ steps.get-version.outputs.version }}"
|
||||
|
||||
echo "Updating PKGBUILD pkgver to $NEW_VERSION"
|
||||
|
||||
# Read PKGBUILD and update pkgver line
|
||||
sed -i "s/^pkgver=.*/pkgver=$NEW_VERSION/" ./PKGBUILD
|
||||
|
||||
# Reset pkgrel to 1 when version changes
|
||||
sed -i "s/^pkgrel=.*/pkgrel=1/" "$PKGBUILD_PATH"
|
||||
|
||||
echo "✅ Successfully updated pkgver to $NEW_VERSION in $PKGBUILD_PATH"
|
||||
|
||||
# Update package checksums and generate .SRCINFO
|
||||
updpkgsums
|
||||
makepkg --printsrcinfo > .SRCINFO
|
||||
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
const fs = require("node:fs");
|
||||
|
||||
function updatePkgver(newVersion, pkgbuildPath) {
|
||||
try {
|
||||
const content = fs.readFileSync(pkgbuildPath, "utf8");
|
||||
const lines = content.split("\n");
|
||||
|
||||
const updatedLines = lines.map((line) => {
|
||||
if (line.trim().startsWith("pkgver=")) {
|
||||
return `pkgver=${newVersion}`;
|
||||
}
|
||||
return line;
|
||||
});
|
||||
|
||||
fs.writeFileSync(pkgbuildPath, updatedLines.join("\n"), "utf8");
|
||||
|
||||
console.log(
|
||||
`✅ Successfully updated pkgver to ${newVersion} in ${pkgbuildPath}`
|
||||
);
|
||||
} catch (error) {
|
||||
console.error(`❌ Error updating pkgver: ${error.message}`);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
// Get version from command line arguments
|
||||
const args = process.argv.slice(2);
|
||||
|
||||
const newVersion = args[0];
|
||||
const pkgbuildPath = args[1] || "./PKGBUILD";
|
||||
|
||||
updatePkgver(newVersion, pkgbuildPath);
|
||||
Reference in New Issue
Block a user