From b310e985c1c0bc5bc2f272eace3ffa2c322d03a8 Mon Sep 17 00:00:00 2001 From: Kor Dwarshuis Date: Wed, 12 Feb 2025 14:48:58 +0100 Subject: [PATCH] Process much simpler, since most has moved from starterpack to spec-up-t package --- .../publishing-to-github-and-npm.md | 44 ++++++++----------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/docs/developer-documentation/publishing-to-github-and-npm.md b/docs/developer-documentation/publishing-to-github-and-npm.md index dde7a29b..a6b600d4 100644 --- a/docs/developer-documentation/publishing-to-github-and-npm.md +++ b/docs/developer-documentation/publishing-to-github-and-npm.md @@ -15,46 +15,30 @@ git add . git commit -m "Add new feature" ``` -::: info -Merging branches is not described here.It's generally best to run npm version after merging your feature branch into the main (or master) branch. This ensures that the version bump and tag are applied to the final state of the code that will be released. +:::info +Merging branches is not described here. It's generally best to run npm version after merging your feature branch into the main (or master) branch. This ensures that the version bump and tag are applied to the final state of the code that will be released. ::: ## Publish to NPM -### Update version numbers +### Update version number -:::warning +https://github.com/trustoverip/spec-up-t/blob/master/package.json#L3 -It's easy to forget to update the version nummer in different locations. Please read carefully what is written below. -::: - -Update the version number in four locations in three`package.json`'s. The idea is to keep the version numbers of all repos the same. If you publish an update to NPM you have to raise the version number in four places: - -1. https://github.com/trustoverip/spec-up-t-starter-pack/blob/main/spec-up-t-boilerplate/package.json#L3 -2. https://github.com/trustoverip/spec-up-t-starter-pack/blob/main/spec-up-t-boilerplate/package.json#L8 -3. https://github.com/trustoverip/spec-up-t-starter-pack/blob/main/package.json#L3 -4. https://github.com/trustoverip/spec-up-t/blob/master/package.json#L3 - -add 1: do this manually, if the current version is 1.0.87, make it 1.0.88 - -add 2: do this manually, if the current version is 1.0.87, make it 1.0.88 - -Now commit this file with message: “Bump version to 1.0.88” - -add 3 & 4: Use this command: +Use this command: ```bash npm version -m "Bump version to %s" ``` -In this case that would be: +In this case that would be something like: ```bash npm version 1.0.88 -m "Bump version to %s" ``` -The % s in the npm version command is a placeholder that gets replaced with the new version number.When you run the command, npm automatically substitutes % s with the version number you specified. +The % s in the npm version command is a placeholder that gets replaced with the new version number. When you run the command, npm automatically substitutes % s with the version number you specified. npm automatically creates a new Git tag that matches the new version number you specified. @@ -63,9 +47,19 @@ npm automatically creates a new Git tag that matches the new version number you Push the changes and the tag to the remote repository: ```bash -git push origin main --tags +git push origin master --tags ``` +or + +```bash +git push upstream master --tags +``` + +where `origin` and/or `upstream` are the remotes that you have configured. + + + ### Publish to NPM Publish the new version to npm: @@ -74,4 +68,4 @@ Publish the new version to npm: npm publish ``` -The new package will be available as soon as it is uploaded. +The package files will now be uploaded. The new package will be available as soon as it is uploaded.