diff --git a/.gitignore b/.gitignore index b4d0b12..dc927be 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ target/ .metals .vscode metals.sbt + +# simplest portable 'sed -i' syntax creates backup files, eg 'sed -i.bak' - see https://unix.stackexchange.com/a/92907/46453 +*.bak \ No newline at end of file diff --git a/sbt-version-policy/src/sbt-test/sbt-version-policy/example-sbt-ci-release/test b/sbt-version-policy/src/sbt-test/sbt-version-policy/example-sbt-ci-release/test index 306065a..c53b604 100644 --- a/sbt-version-policy/src/sbt-test/sbt-version-policy/example-sbt-ci-release/test +++ b/sbt-version-policy/src/sbt-test/sbt-version-policy/example-sbt-ci-release/test @@ -5,7 +5,7 @@ $ exec git config user.name "name" # Before first release, set `versionPolicyIntention` to `Compatibility.None` because # there is no previous release to compare to. -$ exec sed -i 's/versionPolicyIntention := .*/versionPolicyIntention := Compatibility.None/' build.sbt +$ exec sed -i.bak 's/versionPolicyIntention := .*/versionPolicyIntention := Compatibility.None/' build.sbt $ exec git add . $ exec git commit -m "Initial commit" @@ -18,7 +18,7 @@ $ exec git tag v1.0.0 > ci-release # Reset compatibility intention after release -$ exec sed -i 's/versionPolicyIntention := .*/versionPolicyIntention := Compatibility.BinaryAndSourceCompatible/' build.sbt +$ exec sed -i.bak 's/versionPolicyIntention := .*/versionPolicyIntention := Compatibility.BinaryAndSourceCompatible/' build.sbt # New contributions $ exec git commit -a -m "Some hard work" diff --git a/sbt-version-policy/src/sbt-test/sbt-version-policy/example-sbt-dynver/test b/sbt-version-policy/src/sbt-test/sbt-version-policy/example-sbt-dynver/test index 1f08521..d957eb4 100644 --- a/sbt-version-policy/src/sbt-test/sbt-version-policy/example-sbt-dynver/test +++ b/sbt-version-policy/src/sbt-test/sbt-version-policy/example-sbt-dynver/test @@ -13,7 +13,7 @@ $ exec git tag v1.0.0 > publishLocal # Reset compatibility intention after release -$ exec sed -i 's/versionPolicyIntention := .*/versionPolicyIntention := Compatibility.BinaryAndSourceCompatible/' build.sbt +$ exec sed -i.bak 's/versionPolicyIntention := .*/versionPolicyIntention := Compatibility.BinaryAndSourceCompatible/' build.sbt # New contributions $ exec git commit -a -m "Some hard work"