Skip to content

Commit

Permalink
🐛 Replace contents after bumping
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Nov 24, 2020
1 parent 359ceb6 commit d651e75
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,14 @@ export const updateDependencies = async () => {
const pkgName = pkgOldVersion.split("@")[0];
for await (const workflow of workflows) {
let contents = await readFile(join(".", ".github", "workflows", workflow), "utf8");
contents.replace(pkgOldVersion, uses[pkgOldVersion]);
contents = contents.replace(pkgOldVersion, uses[pkgOldVersion]);
await writeFile(join(".", ".github", "workflows", workflow), contents);
}
console.log(
`:up_arrow: Bump ${pkgName} from ${pkgOldVersion.split("@")[1]} to ${
uses[pkgOldVersion].split("@")[0]
}`
);
commit(
`:up_arrow: Bump ${pkgName} from ${pkgOldVersion.split("@")[1]} to ${
uses[pkgOldVersion].split("@")[0]
Expand Down

0 comments on commit d651e75

Please sign in to comment.