Skip to content

Commit

Permalink
chore: safer handling of Go module deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
xiehan committed Dec 14, 2023
1 parent a101f30 commit 44efdc0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/deprecate-packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ export class DeprecatePackages {

const deprecationStep: JobStep = {
name: "Mark the Go module as deprecated",
run: `find 'dist/go' -mindepth 2 -maxdepth 3 -type f -name 'go.mod' | xargs sed -i '1s|^|${deprecationMessageForGo} \n|'`,
run: `find '.repo/dist/go' -mindepth 2 -maxdepth 4 -type f -name 'go.mod' | xargs sed -i '1s|^|${deprecationMessageForGo} \n|'`,
continueOnError: true, // @TODO remove this once we confirm it to be working
};
if (isDeprecated) {
packageInfo.publishToGo?.prePublishSteps?.push(deprecationStep);
packageInfo.publishToGo?.prePublishSteps?.splice(-1, 0, deprecationStep);
}

const releaseWorkflow = project.github?.tryFindWorkflow("release");
Expand Down
7 changes: 4 additions & 3 deletions test/__snapshots__/index.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 44efdc0

Please sign in to comment.