From 6c7a0ff7d36b58c2f9c3efbf4d2858e5ad7e35f4 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Thu, 24 Mar 2022 22:44:22 +0800 Subject: [PATCH] Fix release script --- extra/update-wiki-version.js | 9 +++++++-- package.json | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/extra/update-wiki-version.js b/extra/update-wiki-version.js index 65b56326..10631c33 100644 --- a/extra/update-wiki-version.js +++ b/extra/update-wiki-version.js @@ -1,8 +1,13 @@ -import child_process from "child_process"; -import fs from "fs"; +const child_process = require("child_process"); +const fs = require("fs"); const newVersion = process.env.VERSION; +if (!newVersion) { + console.log("Missing version"); + process.exit(1); +} + updateWiki(newVersion); function updateWiki(newVersion) { diff --git a/package.json b/package.json index d0151385..953ac978 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "update-language-files-with-base-lang": "cd extra/update-language-files && node index.js %npm_config_base_lang% && eslint ../../src/languages/**.js --fix", "update-language-files": "cd extra/update-language-files && node index.js && eslint ../../src/languages/**.js --fix", "ncu-patch": "npm-check-updates -u -t patch", - "release-final": "node extra/update-version.js && npm run build-docker && node ./extra/press-any-key.js && npm run upload-artifacts && node ./extra/update-wiki-version.js", + "release-final": "node extra/update-version.js && npm run build-docker && git push --tags && node ./extra/press-any-key.js && npm run upload-artifacts && node ./extra/update-wiki-version.js", "release-beta": "node extra/beta/update-version.js && npm run build && node ./extra/env2arg.js docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:$VERSION -t louislam/uptime-kuma:beta . --target release --push && node ./extra/press-any-key.js && npm run upload-artifacts", "git-remove-tag": "git tag -d" },