Skip to content

Commit 46ce0cb

Browse files
authored
Merge pull request #298 from minrk/npm-version
Simplify RELEASE.md with npm version
2 parents b85eeb1 + 7748cf3 commit 46ce0cb

File tree

5 files changed

+21
-45
lines changed

5 files changed

+21
-45
lines changed

.bumpversion.cfg

-18
This file was deleted.

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tag-version-prefix=

RELEASE.md

+18-25
Original file line numberDiff line numberDiff line change
@@ -13,69 +13,62 @@ meet the prerequisites:
1313

1414
- To have push rights to the [configurable-http-proxy GitHub
1515
repository](https://github.com/jupyterhub/configurable-http-proxy).
16-
- To have [`bump2version`](https://github.com/c4urself/bump2version) installed
17-
(`pip install bump2version`).
16+
- To have [Node.js](https://nodejs.org) installed.
1817

1918
## Steps to make a release
2019

2120
1. Update [CHANGELOG.md](CHANGELOG.md) if it is not up to date, and verify
2221
[README.md](README.md) has an updated output of running `--help`. Make a PR
2322
to review the CHANGELOG notes.
2423

25-
1. Once the changelog is up to date, checkout main and make sure it is up to
24+
1. Once the changelog is up to date, checkout the main branch and make sure it is up to
2625
date and clean.
2726

2827
```bash
2928
ORIGIN=${ORIGIN:-origin} # set to the canonical remote, e.g. 'upstream' if 'origin' is not the official repo
3029
git checkout main
31-
git fetch $ORIGIN main
32-
git reset --hard $ORIGIN/main
33-
# WARNING! This next command deletes any untracked files in the repo
34-
git clean -xfd
30+
git branch --set-upstream-to=$ORIGIN/main main
31+
git pull
3532
```
3633

37-
1. Update the version with `bump2version` to not include the -dev suffix and let
38-
it make a git commit and tag as well for us.
34+
1. Update the version with [`npm version`](https://docs.npmjs.com/cli/v6/commands/npm-version)
35+
and let it make a git commit and tag as well for us.
3936

4037
```bash
41-
# optionally first bump a minor or major version, but
42-
# don't bump the patch version, that's already done.
43-
# bump2version --no-commit minor
44-
# bump2version --no-commit major
45-
bump2version --tag release
38+
# specify the new version here,
39+
# which should already have been chosen when updating the changelog.
40+
npm version 1.2.3
4641

4742
# verify changes
4843
git diff HEAD~1
4944
```
5045

51-
1. Reset the version to the next development version with `bump2version`.
46+
1. Reset the version to the next development version with `npm version`,
47+
without creating a tag:
5248

5349
```bash
54-
bump2version --no-tag patch
50+
npm version --no-git-tag-version prerelease --preid=dev
51+
git commit -am "back to dev"
5552

5653
# verify changes
5754
git diff HEAD~1
5855
```
5956

60-
1. Push your release related commits to main along with the annotated tags
61-
referencing commits on the main branch.
57+
1. Push your new tag and commits to GitHub.
6258

63-
```
59+
```bash
6460
git push --follow-tags $ORIGIN main
6561
```
6662

67-
1. Visit [GitHub: create new
68-
release](https://github.com/jupyterhub/configurable-http-proxy/releases/new)
69-
and reference your tag.
70-
71-
This will trigger a workflow to publish the NPM package.
72-
7363
1. Verify [the automated
7464
workflow](https://github.com/jupyterhub/configurable-http-proxy/actions?query=workflow%3A%22Publish+to+npm%22)
7565
succeeded.
7666

7767
## Manual release to npm
7868

69+
A manual release should not generally be required,
70+
but might be needed in the event of a problem in the automated publishing workflow.
71+
7972
1. Verify you are a collaborator of the [npmjs
8073
project](https://www.npmjs.com/package/configurable-http-proxy).
8174

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "4.3.2-dev",
2+
"version": "4.3.2-dev.0",
33
"name": "configurable-http-proxy",
44
"description": "A configurable-on-the-fly HTTP Proxy",
55
"author": "Jupyter Developers",

0 commit comments

Comments
 (0)