Skip to content

Commit

Permalink
Syntax fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
enschilling committed Feb 29, 2024
1 parent 1bc139f commit 7927e1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/lib/maven.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export async function bumpMaven(level = "patch") {
}
try {
const { exitCode, stderr } =
await $`sed -I -e '/^version/s/${oldVersion}/${newVersion}/g' pom.xml`;
await $`sed -i -e "s/${oldVersion}/${newVersion}/g" pom.xml`;
if (exitCode !== 0) {
exitWithError(stderr);
}
Expand All @@ -34,11 +34,11 @@ export async function bumpMaven(level = "patch") {
export async function getVersionMaven() {
try {
const { stdout, exitCode, stderr } =
await $`grep "<version>" pom.xml`;
await $`grep "<version>" pom.xml | head -1`;
if (exitCode !== 0) {
exitWithError(stderr);
}
const version = stdout.trim().split("</version>")[0].replaceAll("<version>", "");
const version = stdout.trim().split("</version>")[0].replace("<version>", "");
return version;
} catch (error) {
exitWithError(error.stderr);
Expand Down

0 comments on commit 7927e1e

Please sign in to comment.