Skip to content

Commit

Permalink
[NO-TICKET] Fix release tagging with private packages (#2988)
Browse files Browse the repository at this point in the history
* New private packages broke regex for tags, and I'm making it better

Along with fixing the regex pattern to make it able to not get tripped up by packages that don't have a `@cmsgov` namespace, I made it only match the four design system packages so we reduce the tag noise. This really only removes our private docs package from the tags, but I think that's an improvement.

* Clean up testing output
  • Loading branch information
pwolfert authored Mar 22, 2024
1 parent 1caab93 commit 6cb6cb5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ function getCurrentBranch() {
function readLastPublishCommit() {
const commitHash = getCurrentCommit();
const commitMessage = sh('git log -1 --pretty=%B');
const tags = commitMessage.match(/@.*$/gm);
// Only make tags for the actual design system packages
const tags = commitMessage.match(/@cmsgov\/(?:design-system@|ds-).*$/gm);

if (!tags) {
throw Error('The previous commit was not a publish commit. Cannot read tags!');
Expand Down

0 comments on commit 6cb6cb5

Please sign in to comment.