Skip to content

Commit

Permalink
Merge pull request #181 from guardian/use-portable-sed-inline-syntax-…
Browse files Browse the repository at this point in the history
…for-mac-os-and-linux

Fix `scripted` tests on Mac: use portable `sed -i` syntax
  • Loading branch information
sjrd authored Oct 17, 2023
2 parents b7fc360 + 0eb784d commit 322da0c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 322da0c

Please sign in to comment.