Skip to content

Commit 4171046

Browse files
cincodenadafatso83
andauthored
Adjust deploy scripts to archive old releases in a separate branch, move existing releases out of master (#2426)
* Remove release archives from master These archives made it difficult to find things in the GitHub interface, and take up a lot of space in a checked-out repo for something that is not useful to most people checking out the repository. The main purpose of these archives is to make old versions and documentation available on the Sinon website that is run out of this repo. This can be supported by using a separate branch for website releases, and to maintain the archives. Following this commit, the `npm version` scripts will be updated to automatically handle archiving the releases in the new releases branch and keeping it up to date with master. Also remove the directories we removed from .prettierignore, since they don't exist any more. * Update npm version scripts to manage new releases branch This updates the `postversion.sh` script to merge master into the new `releases` branch and then copy and commit the version archives there, instead of into master, so that the archives aren't cluttering up the master branch unnecessarily. * Move changelog updates into version script Previously we were updating the changelog and doing other auxiliary version bumps in the post-version script, which meant they weren't included in the tagged release commit, and required a followup commit. This moves the version-bumping changes into a new `version.sh` script, so that those changes show up in the tagged version commit. * Don't ignore changelogs in prettier We were manually running prettier on CHANGELOG.md during release but ignoring it in .prettierrc - this may have been a holdover from before Prettier had the proseWrap option, which would have wreacked havoc with the changelog, but the current version handles things just fine. * Merge silently into the archive branch We shouldn't ever have conflicts here, so we can just auto-merge * Tweak changelog.md generation to be more compatible $(<CHANGES.md) wasn't working on my machine, I think because it's a bash-ism, and my machine was running it under sh. I also took the chance to do something more useful than just `cat` by removing the double header that was previously on this page. * Fail if we cancel CHANGES.md Also make version.sh a bash script like the others - this would have fixed the update-change-log-page script, in retrospect, but I think it's worth getting rid of the double header anyway. * Clean up copied directories Otherwise when we switch back to the source branch we'll have these files left dangling, which was what we were trying to avoid in the first place * Don't defeat set -e Stringing commands together like this makes it so if the push doesn't work, we keep going, which we don't want! * Temporary commit to make publish a dry-run This makes the script work on my machine, since I of course can't actually publish to sinon's npm package Also skip postbuild because chrome tests aren't working on my machine and `npm install` doesn't fix it * 12.0.2 Co-authored-by: Carl-Erik Kopseng <[email protected]>
1 parent c80a726 commit 4171046

File tree

2,582 files changed

+55
-2598505
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,582 files changed

+55
-2598505
lines changed

.prettierignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,4 @@ tmp/
55
.sass-cache
66
docs/_site/
77
docs/js/
8-
docs/releases/
9-
docs/_releases/
108
docs/assets/js/
11-
CHANGELOG.md
12-
docs/changelog.md

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changes
22

3+
## 12.0.2
4+
5+
_Released by [Carl-Erik Kopseng](https://github.com/fatso83) on 2022-01-27._
6+
37
## 12.0.1
48

59
- [`3f598221`](https://github.com/sinonjs/sinon/commit/3f598221045904681f2b3b3ba1df617ed5e230e3)

RELEASE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ The release process is mostly automated, here is a brief overview of the steps
99
- Updates `AUTHORS`
1010
- Updates `package.json` with new version
1111
- Creates a new git tag
12-
- Copies new release documentation into place in `docs/_releases/`, using the new release id
1312
2. `npm publish` publishes the new release to the npm registry
1413
3. `git push origin --follow-tags` pushes the changes to GitHub
14+
4. Archive the new release in the `releases` branch under the new release id
1515

1616
Each step is described in detail below.
1717

docs/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: >-
55
url: 'https://sinonjs.org'
66
github_username: sinonjs
77
sinon:
8-
current_release: v12.0.1
8+
current_release: v12.0.2
99
markdown: kramdown
1010
kramdown:
1111
input: GFM

docs/_releases/latest.md

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

docs/_releases/latest/assertions.md

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

docs/_releases/latest/examples/.eslintrc.yml

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

docs/_releases/latest/examples/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/_releases/latest/examples/fakes-1-using-fakes-instead-of-spies.test.js

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

docs/_releases/latest/examples/fakes-10-firstArg.test.js

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

docs/_releases/latest/examples/fakes-11-lastArg.test.js

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

docs/_releases/latest/examples/fakes-12-adding-fake-to-system-under-test.test.js

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

docs/_releases/latest/examples/fakes-2-using-fakes-instead-of-stubs.test.js

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

0 commit comments

Comments
 (0)