Skip to content

Commit 65ad596

Browse files
authored
chore: fix version in metadata and ship config (#68)
## Changes - **ship.config.js**: Read version from `package.json` instead of using Ship.js's `tag` parameter (which is the npm dist-tag `"latest"`, not the semver version) - **ship.config.js**: Remove unwanted `shouldPrepare` block - **metadata.yaml**: Fix 5 historical entries that had `"latest"` instead of actual version numbers, and remove `v` prefix for consistency
1 parent c7d5052 commit 65ad596

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

metadata.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ homepage: https://www.algolia.com
22
documentation: https://github.com/algolia/search-insights-gtm
33
versions:
44
- sha: 8a9bc249b800bdc8176c4dbbc04a21c6297676d2
5-
changeNotes: "chore: update version to latest"
5+
changeNotes: "chore: update version to 1.8.0"
66
- sha: 5f2ff3a21159908853c0d8de10eadd8de8a6cbac
7-
changeNotes: "chore: update version to latest"
7+
changeNotes: "chore: update version to 1.7.3"
88
- sha: 62597a80ad70684fcd0bfbe43d2a69a73b447986
9-
changeNotes: "chore: update version to latest"
9+
changeNotes: "chore: update version to 1.7.2"
1010
- sha: bf5bc8ccdbd1459508d19330af772c9fa413e519
11-
changeNotes: "chore: update version to latest"
11+
changeNotes: "chore: update version to 1.7.1"
1212
- sha: e1b38a5988dcb3a22b0154f26f1397fb9ad839e0
13-
changeNotes: "chore: update version to latest"
13+
changeNotes: "chore: update version to 1.7.0"
1414
- sha: 4e8c7ee78328514c3a5f4e66061c4642b6abb343
1515
changeNotes: "chore: update version to 1.6.6"
1616
- sha: 1b6f15e09482a536ff72ff512fc368903d4feb25
@@ -31,13 +31,13 @@ versions:
3131
- sha: dbe70546723fb556fd71178e02db5e681ca3fb13
3232
changeNotes: "fix: update logo (#17)"
3333
- sha: 68b3e1a8eb9b18f9be53dd972bb80db260dd5daf
34-
changeNotes: "chore: update version to v1.4.0"
34+
changeNotes: "chore: update version to 1.4.0"
3535
- sha: a294bc5d5c73b9b397b60d59725a0469168669bd
36-
changeNotes: "chore: update version to v1.3.1"
36+
changeNotes: "chore: update version to 1.3.1"
3737
- sha: 7104e0b191dd1fef9e144303815e11f5abef08aa
38-
changeNotes: "chore: update version to v1.3.0"
38+
changeNotes: "chore: update version to 1.3.0"
3939
- sha: ae7d017b482c99e3736bb3a55d216ddfbd7ad3bf
40-
changeNotes: "chore: update version to v1.2.1"
40+
changeNotes: "chore: update version to 1.2.1"
4141
- sha: faa43f692e46efd005a726ea68b184620a81d37d
4242
changeNotes: upgrade search-insights and remove validations
4343
- sha: 0608f26267dae35a6fcc2186d62816928c3563b0

ship.config.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
const { exec } = require('shelljs');
22

33
module.exports = {
4-
shouldPrepare: ({ releaseType, commitNumbersPerType }) => {
5-
const { fix = 0 } = commitNumbersPerType;
6-
if (releaseType === 'patch' && fix === 0) {
7-
return false;
8-
}
9-
return true;
10-
},
114
buildCommand: () => 'yarn build',
125
pullRequestTeamReviewers: ['events-platform'],
13-
publishCommand: ({ tag }) => {
6+
publishCommand: ({ dir }) => {
147
// update metadata.yaml by executing external script instead of inline because
158
// the esm module loader being used by Ship.js is incompatible with the YAML package
16-
exec(`node scripts/update-metadata.js ${tag}`);
9+
const version = require(`${dir}/package.json`).version;
10+
exec(`node scripts/update-metadata.js ${version}`);
1711
return `git commit -am "chore: update metadata.yml"`;
1812
},
1913
};

0 commit comments

Comments
 (0)