Skip to content

Commit

Permalink
fix: relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas GRUSON committed Feb 9, 2021
1 parent 57013f8 commit 78cbb18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/helm-chart-dev.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

STABLE_CHART=$(cat ../charts/stable/Chart.yaml | grep version | sed -e 's/version: //')
DEV_CHART=$(cat ../charts/dev/Chart.yaml | grep version | sed -e 's/version: //')
STABLE_CHART=$(cat charts/stable/Chart.yaml | grep version | sed -e 's/version: //')
DEV_CHART=$(cat charts/dev/Chart.yaml | grep version | sed -e 's/version: //')
DEV_CHART_BASE=$(echo "${DEV_CHART}" | sed -e 's/-rc.*//')

if [ "$STABLE_CHART" = "$DEV_CHART_BASE" ]; then
Expand All @@ -13,4 +13,4 @@ DEV_CHART_NUMBER=$(echo "${DEV_CHART}" | sed -e 's/.*-rc\.//')
DEV_CHART_NUMBER=$((DEV_CHART_NUMBER+1))
DEV_CHART="${DEV_CHART_BASE}-rc.${DEV_CHART_NUMBER}"

sed -i'.old' "s/^version:.*$/version: ${DEV_CHART}/" ../charts/dev/Chart.yaml
sed -i'.old' "s/^version:.*$/version: ${DEV_CHART}/" charts/dev/Chart.yaml
10 changes: 5 additions & 5 deletions .github/helm-chart-stable.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/bash

STABLE_CHART=$(cat ../charts/stable/Chart.yaml | grep version | sed -e 's/version: //')
DEV_CHART=$(cat ../charts/dev/Chart.yaml | grep version | sed -e 's/version: //')
STABLE_CHART=$(cat charts/stable/Chart.yaml | grep version | sed -e 's/version: //')
DEV_CHART=$(cat charts/dev/Chart.yaml | grep version | sed -e 's/version: //')
DEV_CHART_BASE=$(echo "${DEV_CHART}" | sed -e 's/-rc.*//')

if [ "$STABLE_CHART" = "$DEV_CHART_BASE" ]; then
>&2 echo "ERROR: Same chart version for dev and stable (${STABLE_CHART})"
exit 1
fi

rm -rf ../charts/stable
cp -r ../charts/dev ../charts/stable
rm -rf charts/stable
cp -r charts/dev charts/stable

sed -i'.old' "s/^version:.*$/version: ${DEV_CHART_BASE}/" ../charts/stable/Chart.yaml
sed -i'.old' "s/^version:.*$/version: ${DEV_CHART_BASE}/" charts/stable/Chart.yaml

0 comments on commit 78cbb18

Please sign in to comment.