Skip to content

Commit

Permalink
Fix: ArgoCD 정상화 - grep version 문제
Browse files Browse the repository at this point in the history
grep 'version:' 명령은 이 모든 라인을 찾아내어 VERSION 변수에 다음과 같은 형태로 저장합니다:

Related to: #15
  • Loading branch information
Sean-creative committed May 7, 2024
1 parent 2760d13 commit 9d739b1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/union.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,17 @@ jobs:
id: bump-version
run: |
CHART_DIR=charts/jsvill-chart
VERSION=$(grep 'version:' $CHART_DIR/Chart.yaml | awk '{print $2}')
NEW_VERSION=$(echo $VERSION | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./g')
VERSION=$(awk '/^version: /{print $2}' $CHART_DIR/Chart.yaml)
NEW_VERSION=$(echo $VERSION | awk -F. '{++$NF}1' | tr ' ' '.')
echo "Current VERSION: $VERSION"
echo "New VERSION: $NEW_VERSION"
sed -i "s/version: $VERSION/version: $NEW_VERSION/" $CHART_DIR/Chart.yaml
sed -i "s/^version: $VERSION/version: $NEW_VERSION/" $CHART_DIR/Chart.yaml
echo "::set-output name=new-version::$NEW_VERSION"
git add $CHART_DIR/Chart.yaml
git commit -m "Bump chart version to $NEW_VERSION"
git push origin HEAD
- name: Install Helm
uses: azure/setup-helm@v3

Expand Down

0 comments on commit 9d739b1

Please sign in to comment.