mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 10:00:56 +00:00
Merge pull request #425 from schweikert/mac_sed
use 'sed -i.bak' instead of 'sed -i' to make it compatible with macos…
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -11,3 +11,6 @@ kustomize
|
|||||||
|
|
||||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||||
*.out
|
*.out
|
||||||
|
|
||||||
|
# We use sed -i.bak when doing in-line replace, because it works better cross-platform
|
||||||
|
.bak
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ the server will use:
|
|||||||
|
|
||||||
<!-- @changeMap @test -->
|
<!-- @changeMap @test -->
|
||||||
```
|
```
|
||||||
sed -i 's/pineapple/kiwi/' $OVERLAYS/staging/map.yaml
|
sed -i.bak 's/pineapple/kiwi/' $OVERLAYS/staging/map.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
See the new greeting:
|
See the new greeting:
|
||||||
|
|||||||
@@ -108,16 +108,10 @@ label_ applied to all resources:
|
|||||||
|
|
||||||
<!-- @addLabel @test -->
|
<!-- @addLabel @test -->
|
||||||
```
|
```
|
||||||
sed -i 's/app: hello/app: my-hello/' \
|
sed -i.bak 's/app: hello/app: my-hello/' \
|
||||||
$BASE/kustomization.yaml
|
$BASE/kustomization.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
On a Mac, use:
|
|
||||||
```
|
|
||||||
sed -i '' $pattern $file
|
|
||||||
```
|
|
||||||
to get in-place editing.
|
|
||||||
|
|
||||||
See the effect:
|
See the effect:
|
||||||
<!-- @checkLabel @test -->
|
<!-- @checkLabel @test -->
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ a label, but one can always edit `kustomization.yaml` directly:
|
|||||||
|
|
||||||
<!-- @customizeLabels @test -->
|
<!-- @customizeLabels @test -->
|
||||||
```
|
```
|
||||||
sed -i 's/app: helloworld/app: prod/' \
|
sed -i.bak 's/app: helloworld/app: prod/' \
|
||||||
$DEMO_HOME/kustomization.yaml
|
$DEMO_HOME/kustomization.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user