Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scripted tests on Mac: use portable sed -i syntax #181

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading