Skip to content

Commit

Permalink
Revert "releng: Define publishing latest semantic versions"
Browse files Browse the repository at this point in the history
This reverts commit 7d951b7.

As there is an issue [1] below that requires addressing at this stage.

[1]https://github.com/eclipse-cdt-cloud/theia-trace-extension/actions/runs/5555110824

Signed-off-by: Marco Miller <marco.miller@ericsson.com>
  • Loading branch information
marco-miller committed Jul 14, 2023
1 parent 7d951b7 commit f65b9ed
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 92 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/publish-latest.yml

This file was deleted.

6 changes: 4 additions & 2 deletions .github/workflows/publish-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: NPM package (next)
on:
push:
branches: [ master ]
# release:
# types: [created]
jobs:
build:
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'eclipse-cdt-cloud/theia-trace-extension' && "!contains(github.event.head_commit.message, '[latest]:')"
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'eclipse-cdt-cloud/theia-trace-extension'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -14,7 +16,7 @@ jobs:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
# Defaults to the user or organization that owns the workflow file
scope: '@theia-ide'
scope: '@theia-ide'
- run: yarn
- run: yarn publish:next
env:
Expand Down
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# LC_COLLATE=C sort .gitignore
!examples/*/electron-builder.yml
!examples/*/package.json
!examples/*/resources/
!examples/*/scripts/
*.log
*.tsbuildinfo
.browser_modules/
Expand All @@ -8,11 +12,7 @@
/packages/react-components/lib/
TraceCompassTutorialTraces
TraceCompassTutorialTraces.tgz
examples/*/gen-webpack.config.js
examples/*/lib/
examples/*/src-gen/
examples/electron/dist/
examples/plugins/
examples/*
node_modules/
theia-extensions/viewer-prototype/lib/
trace-compass-server
Expand Down
50 changes: 0 additions & 50 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,62 +144,13 @@ file. Adding the SHA-1 of a commit to this file will make `git-blame` ignore tha
* For GitHub, this file is automatically detected and will ignore all the commits that are included in the file.
* With Git CLI, run `git blame --ignore-revs-file=.git-blame-ignore-revs <pathToSomeFile>` to ignore the commits.

## Releasing a new version

* Run either one of the below repository root commands, depending on the case at hand.
* Below, `Z` means `z+1`, and the same notation is used for `x` and `y`.

For a release bumping the version from `x.y.z` to `x.y.Z`:

```bash
yarn version:patch
```

For a release bumping the version from `x.y.z` to `x.Y.z`:

```bash
yarn version:minor
```

For a release bumping the version from `x.y.z` to `X.y.z`:

```bash
yarn version:major
```

Currently, [automatically adding][auto-signoff] a [Signed-off-by:][sign-off] footer to the
resulting commit message fails for this `lerna` use with `yarn`. Should one be necessary,
the commit needs to be amended accordingly, using `git commit --amend -s` or the like.

Once pushed, reviewed then merged, the resulting commit triggers the GitHub workflow that
publishes this new release to [the npm Registry][npm-registry]. That action shall also push
the corresponding git tag. The locally created tag (internally by `lerna version`) should
then be overridable by that remote one.

Should there be an issue with that automated workflow, the said local tag can be manually
pushed, once the commit is merged and [published as latest release][npm-registry]. If need
be, the latter step can also be done manually by running this repository root command:

```bash
yarn && yarn publish:latest`
```

If needed, this is a command template to push the tag after publishing per above:

```bash
git push origin vX.Y.Z
```

Where either one of `X`, `Y` or `Z` was bumped depending on the chosen case further above.

## Contact

For issues related to the Trace Viewer, please open a GitHub tracker for the [Theia Trace Extension][trace-viewer].

For issues concerning `eclipse-cdt-cloud`, please refer to the contact options listed on the [CDT.Cloud website][cdt-cloud-website].

[architecture]: https://github.com/theia-ide/theia-trace-extension#architecture
[auto-signoff]: https://github.com/lerna/lerna/blob/main/libs/commands/version/README.md#--signoff-git-commit
[cdt-cloud-website]: https://cdt-cloud.io/contact/
[code-of-conduct]: https://github.com/eclipse/.github/blob/master/CODE_OF_CONDUCT.md
[commit-message-example]: https://github.com/theia-ide/theia-trace-extension/commit/bc18fcd110d7b8433293692421f2e4fb49f89bd6
Expand All @@ -220,7 +171,6 @@ For issues concerning `eclipse-cdt-cloud`, please refer to the contact options l
[issue-369]: https://github.com/theia-ide/theia-trace-extension/pull/369/files
[issue-402]: https://github.com/theia-ide/theia-trace-extension/pull/402
[new-contributors]: #new-contributors
[npm-registry]: https://www.npmjs.com/
[pr-guide]: #pull-request-guidelines
[pull-requests]: https://github.com/eclipse-cdt-cloud/theia-trace-extension/pulls
[sign-off]: https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff
Expand Down
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@
"start-all:electron": "yarn start:server & yarn start:electron",
"lint": "lerna run lint",
"test": "lerna run test --",
"publish:latest": "lerna publish from-git --registry=https://registry.npmjs.org/ --exact --no-push --yes",
"publish:latest": "lerna publish --registry=https://registry.npmjs.org/ --exact --no-git-tag-version --no-push",
"publish:next": "lerna publish --registry=https://registry.npmjs.org/ --exact --canary minor --preid=next.$(date -u '+%Y%m%d%H%M%S').$(git rev-parse --short HEAD) --dist-tag=next --no-git-tag-version --no-push --yes",
"format:write": "lerna run format:write",
"format:check": "lerna run format:check",
"version:major": "lerna version major --exact --no-push --yes -m \"[latest]: %s #major\n\nGitHub workflow shall publish and tag upon merge.\"",
"version:minor": "lerna version minor --exact --no-push --yes -m \"[latest]: %s #minor\n\nGitHub workflow shall publish and tag upon merge.\"",
"version:patch": "lerna version patch --exact --no-push --yes -m \"[latest]: %s #patch\n\nGitHub workflow shall publish and tag upon merge.\""
"format:check": "lerna run format:check"
},
"keywords": [
"theia-extension",
Expand Down

0 comments on commit f65b9ed

Please sign in to comment.