Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

Commit fcbadef

Browse files
Merge pull request #133 from segmentio/dj/release-fix
(readme) Fix and improve release process
2 parents 61ff1a2 + e434971 commit fcbadef

File tree

6 files changed

+95
-0
lines changed

6 files changed

+95
-0
lines changed

.circleci/changelog-check.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
set -o nounset
3+
set -o errexit
4+
REPO_ROOT=$(git rev-parse --show-toplevel)
5+
echo "Git repo is at $REPO_ROOT"
6+
BRANCH=$(git rev-parse --abbrev-ref HEAD)
7+
REMOTE="origin/master"
8+
SITE_CHANGES=$(git diff "$BRANCH".."$REMOTE" | wc -l)
9+
echo "Detected $SITE_CHANGES changes"
10+
if [ "$SITE_CHANGES" -gt "0" ]; then
11+
echo "Checking to make sure package version was updated..."
12+
HISTORY_CHANGED=$(git diff "$BRANCH".."$REMOTE" -- $REPO_ROOT/HISTORY.md | wc -l)
13+
if [ "$HISTORY_CHANGED" -gt "0" ]; then
14+
echo "History was updated! Continuing..."
15+
else
16+
echo "History was not updated :( Aborting push."
17+
exit 1
18+
fi
19+
fi

.circleci/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ jobs:
4949
- run: yarn run snyk test --severity-threshold=high
5050
- run: yarn run snyk monitor
5151

52+
changelog:
53+
<<: *defaults
54+
steps:
55+
- checkout
56+
- run: make release-test
57+
5258
publish:
5359
<<: *defaults
5460
steps:
@@ -61,6 +67,10 @@ workflows:
6167
version: 2
6268
test_and_publish:
6369
jobs:
70+
- changelog:
71+
filters:
72+
tags:
73+
only: /.*/
6474
- test:
6575
filters:
6676
tags:
@@ -76,6 +86,7 @@ workflows:
7686
- publish:
7787
requires:
7888
- test
89+
- changelog
7990
filters:
8091
tags:
8192
only: /v[0-9]+(\.[0-9]+)*(-.+)?/

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @segmentio/libraries-team

HISTORY.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,61 @@
1+
# v3.11.0 / 2020-01-27
2+
3+
- v3.11.0
4+
- feat: use SameSite=Lax by default (#128)
5+
6+
# v3.10.1 / 2019-11-20
7+
8+
- v3.10.1
9+
- remove old comments
10+
- change callcount variable
11+
- clean up return statement
12+
- remove after
13+
14+
# v3.10.0 / 2019-11-13
15+
16+
- v3.10.0
17+
- Revert "after fix"
18+
- feat(middleware): add source middleware support
19+
20+
# v3.9.1 / 2019-11-04
21+
22+
- v3.9.1
23+
- fix(client): remove ready() call when no integrations
24+
- change after
25+
26+
# v3.9.0 / 2019-07-02
27+
28+
- v3.9.0
29+
- Add middleware support (#113)
30+
31+
# v3.8.2 / 2019-03-15
32+
33+
- v3.8.2
34+
- feat(ids): add `localStorageFallbackDisabled` flag
35+
36+
# v3.8.1 / 2019-03-13
37+
38+
- v3.8.1
39+
- feat(ids): check LocalStorage when cookies are not available
40+
- ci(circle): add commitlint-circle
41+
- chore(git): add commitizen and commitlint
42+
43+
# v3.8.0 / 2019-03-07
44+
45+
- v3.8.0
46+
- Generate MessageId (#106)
47+
48+
# v3.7.2 / 2018-07-30
49+
50+
- v3.7.2
51+
- ci: login to NPM for publish and use defaults
52+
53+
# v3.7.1 / 2018-07-30
54+
55+
- v3.7.1
56+
- ci: add v prefix for publish step
57+
- docs: fix version in changelog
58+
159
# 3.7.0 / 2018-07-30
260

361
- ci: Fix publish step in circle config (https://github.com/segmentio/analytics.js-core/pull/97)

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,8 @@ test-browser: install
7575
test: lint test-browser
7676
.PHONY: test
7777

78+
release-test:
79+
sh .circleci/changelog-check.sh
80+
.PHONY: release-test
81+
7882
.DEFAULT_GOAL = test

RELEASING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ We use [`np`](https://github.com/sindresorhus/np) to prepare a release.
77
`np` will be automatically installed by running `yarn`, and you can run it with `yarn run np`. You can pass flags to it just as you would with `np`, e.g. you can run `yarn np minor`.
88

99
If you run `np` directly, take care to use the [`--no-publish`](https://github.com/sindresorhus/np#publish-with-a-ci) flag. This ensures that we don't directly publish to NPM from a local dev machine.
10+
11+
Make sure the changelog is properly updated by running `git changelog --tag <version> --no-merges`

0 commit comments

Comments
 (0)