Skip to content

Commit 97e9160

Browse files
committed
[ci-set-version] follow with pick-random-user's code
1 parent 2e23705 commit 97e9160

4 files changed

Lines changed: 19 additions & 64 deletions

File tree

.github/workflows/publish-tag.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,35 @@ jobs:
2828
user_email="github-actions@github.com"
2929
fi
3030
echo "user_email=$user_email" >> $GITHUB_ENV
31-
31+
3232
- name: Configure Git with the triggering user's info
3333
run: |
3434
git config user.name "${{ github.actor }}"
3535
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
3636
37-
38-
- name: Bump version and push tag
37+
- name: Bump version, update manifest, commit and tag
3938
run: |
39+
set -euo pipefail
40+
4041
npm install
42+
43+
# 1) Bump package.json + package-lock.json but DO NOT commit/tag yet
4144
npm version ${{ github.event.inputs.release_type }} --no-git-tag-version
42-
NEW_VERSION=$(node -e "console.log(require('./package.json').version)")
43-
npm run set-manifest:version -- "$NEW_VERSION"
45+
46+
# 2) Read the new version from package.json
47+
NEW_VERSION=$(node -p "require('./package.json').version")
48+
echo "New version is: $NEW_VERSION"
49+
50+
# 3) Update manifest.json's "version" field to match
51+
jq --arg v "$NEW_VERSION" '.version = $v' manifest.json > manifest.json.tmp
52+
mv manifest.json.tmp manifest.json
53+
54+
# 4) Commit everything and create an annotated tag
4455
git add package.json package-lock.json manifest.json
4556
git commit -m "chore: bump version to $NEW_VERSION"
46-
git tag "v$NEW_VERSION"
57+
git tag -a "v$NEW_VERSION" -m "v$NEW_VERSION"
58+
59+
# 5) Push commit and tag
4760
git push --follow-tags
4861
env:
4962
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,6 @@ pluginManifests=[{"url":"<your-domain>/path/to/manifest.json"}]
2727
Or additionally, you can add this same configuration in the `.properties` file from `bbb-web` in `/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties`
2828

2929

30-
## Setting the Plugin manifest Version
31-
32-
To set or update the `version` field in `manifest.json`, run:
33-
34-
```bash
35-
npm run set-manifest:version -- <version>
36-
```
37-
38-
For example:
39-
40-
```bash
41-
npm run set-manifest:version -- 1.0.0
42-
```
43-
44-
This will add the field if it doesn't exist yet, or overwrite it if it does.
45-
4630
## Development mode
4731

4832
As for development mode (running this plugin from source), please, refer back to https://github.com/bigbluebutton/bigbluebutton-html-plugin-sdk section `Running the Plugin from Source`

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"styled-components": "^5.3.3"
1313
},
1414
"scripts": {
15-
"set-manifest:version": "bash scripts/set-plugin-manifest-version-to.sh -v",
1615
"build-bundle": "webpack --mode production",
1716
"start": "webpack serve --mode development",
1817
"build:watch": "rm -rf dist && tsc -w --module CommonJS",

scripts/set-plugin-manifest-version-to.sh

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)