diff --git a/README.md b/README.md index f27b24f0..e2cb9963 100644 --- a/README.md +++ b/README.md @@ -162,8 +162,8 @@ npm run package:all ### Build-in Talk update Built-in Talk in binaries is updated to $(VERSION) Talk changelog: https://github.com/nextcloud/spreed/blob/master/CHANGELOG.md - ``` -3. Update `package.json`: + ``` +3. Update `package.json`: - For minor update: ```sh npm version minor @@ -198,9 +198,9 @@ npm run package:all ```md > 📥 Download Binaries on https://github.com/nextcloud-releases/talk-desktop/releases/tag/v$(version) ``` -9. Package release, specify version and platforms: +9. Package release for specified platforms: ```sh - npm run release:package -- --version v$(talkVersion) --windows --linux --mac + npm run release:package -- --windows --linux --mac ``` 10. Upload packages to the GitHub Releases on [nextcloud-releases/talk-desktop](https://github.com/nextcloud-releases/talk-desktop/releases/lastest) 11. Publish both releases on GitHub Releases diff --git a/package.json b/package.json index 8ac6cab5..01ad7ae7 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,9 @@ "lint": "eslint --ext .js,.vue src/ --fix", "typecheck": "vue-tsc --noEmit" }, + "talk": { + "stable": "v20.0.2" + }, "dependencies": { "@mdi/svg": "^7.4.47", "@nextcloud/axios": "^2.5.1", diff --git a/scripts/prepare-release-packages.mjs b/scripts/prepare-release-packages.mjs index eeb0b788..361f754c 100644 --- a/scripts/prepare-release-packages.mjs +++ b/scripts/prepare-release-packages.mjs @@ -3,11 +3,12 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ +import { $, echo, spinner, argv, fs, os, usePwsh } from 'zx' +const packageJson = require('../package.json') + const TALK_PATH = './out/.temp/spreed/' const talkDotGit = `${TALK_PATH}.git` -import { $, echo, spinner, argv, fs, os, usePwsh } from 'zx' - $.quiet = true function exit(message, code) { @@ -21,11 +22,11 @@ function exit(message, code) { function help() { echo`Prepare release packages for Talk Desktop with Talk in ${TALK_PATH} - Usage: npm run release:package -- --version=v17.0.0 --linux --mac --windows + Usage: npm run release:package -- --linux --mac --windows --version=v20.0.0 Args: --help - show help - --version - Talk version to be build-in in the release, for example, v17.0.0-rc.1 or master + --version - Optionally a specific Talk version/branch to build with, for example, v20.0.0-rc.1 or main. Default to stable in package.json. --windows - build Windows package --linux - build Linux package --mac - build macOS package @@ -40,15 +41,15 @@ function help() { * @return {Promise} */ async function prepareRelease() { + const version = argv.version ?? packageJson.talk.stable + // Validate arguments - const version = argv.version - if (!version) { - exit(`❌ You must specify --version`, 1) - } if (!argv.windows && !argv.linux && !argv.mac) { exit('❌ You must specify at least one of --windows, --linux or --mac', 1) } + echo`Packaging Nextcloud Talk v${packageJson.version} with Talk ${version}...` + // Git wrapper for Talk repository const gitSpreed = (command) => $`git --git-dir=${talkDotGit} --work-tree=${TALK_PATH} ${command}`