Skip to content

Commit

Permalink
chore: update shipjs config to use correct team name and bump version…
Browse files Browse the repository at this point in the history
… in requirejs docs (#549)
  • Loading branch information
JasonBerry authored Aug 12, 2024
1 parent 557e028 commit 6a89eab
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion ship.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
const fs = require("fs");
const path = require("path");

module.exports = {
shouldPrepare: ({ releaseType, commitNumbersPerType }) => {
const { fix = 0 } = commitNumbersPerType;
Expand All @@ -7,5 +10,15 @@ module.exports = {
return true;
},
buildCommand: () => "yarn build && /bin/bash ./pre-deploy.sh",
pullRequestTeamReviewers: ["event-experiences"]
versionUpdated: ({ version, dir }) => {
// update version in `docs/requirejs.md`
const requirejsDocsPath = path.resolve(dir, "docs", "requirejs.md");
const requirejsDocs = fs.readFileSync(requirejsDocsPath).toString();
const updatedRequirejsDocs = requirejsDocs.replace(
/(\/search-insights@)([^\/]+)(\/dist)/,
`$1${version}$3`
);
fs.writeFileSync(requirejsDocsPath, updatedRequirejsDocs);
},
pullRequestTeamReviewers: ["events-platform"]
};

0 comments on commit 6a89eab

Please sign in to comment.