Skip to content

Commit

Permalink
replace sed using with perl
Browse files Browse the repository at this point in the history
exclude vscode specific configurations

Signed-off-by: Alexandre Lamarre <[email protected]>
  • Loading branch information
alexandreLamarre authored and mallardduck committed Dec 19, 2024
1 parent 9c30dae commit b95952b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 35 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ test-backup-location-local/
/backups
/tests/hull/output
*~
kubeconfig*.yaml
kubeconfig*.yaml
.vscode
20 changes: 0 additions & 20 deletions .vscode/launch.json

This file was deleted.

26 changes: 12 additions & 14 deletions scripts/package-helm
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@ set -e


function edit-charts() {
sed -i \
-e 's/^version:.*/version: '${1}'/' \
-e 's/^appVersion:.*/appVersion: '${1}'/' \
-e 's/catalog.cattle.io\/upstream-version:.*/catalog.cattle.io\/upstream-version: '${1}'/' \
build/charts/rancher-backup/Chart.yaml

sed -i \
-e 's/%TAG%/'${2}'/' \
build/charts/rancher-backup/values.yaml

sed -i \
-e 's/^version:.*/version: '${1}'/' \
-e 's/^appVersion:.*/appVersion: '${1}'/' \
build/charts/rancher-backup-crd/Chart.yaml
perl -i -pe '
s/^version:.*/version: '"${1}"'/;
s/^appVersion:.*/appVersion: '"${1}"'/;
s/catalog\.cattle\.io\/upstream-version:.*/catalog.cattle.io\/upstream-version: '"${1}"'/
' build/charts/rancher-backup/Chart.yaml

perl -i -pe 's/%TAG%/'"${2}"'/' build/charts/rancher-backup/values.yaml

perl -i -pe '
s/^version:.*/version: '"${1}"'/;
s/^appVersion:.*/appVersion: '"${1}"'/
' build/charts/rancher-backup-crd/Chart.yaml
}

function package-charts() {
Expand Down

0 comments on commit b95952b

Please sign in to comment.