Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: specify built-in Talk version in package.json #858

Merged
merged 2 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
17 changes: 9 additions & 8 deletions scripts/prepare-release-packages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand All @@ -40,15 +41,15 @@ function help() {
* @return {Promise<void>}
*/
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}`

Expand Down