Skip to content

Commit 01fa206

Browse files
authored
Merge pull request #76 from FIWARE/fix-version-update
test version fix
2 parents 1f41a85 + 0c72c82 commit 01fa206

File tree

2 files changed

+1
-89
lines changed

2 files changed

+1
-89
lines changed

.github/workflows/check.yaml

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -83,91 +83,3 @@ jobs:
8383
message: "Please apply one of the following labels to the PR: 'patch', 'minor', 'major'."
8484
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8585

86-
prepare-release:
87-
needs: ["check-labels", "comment"]
88-
89-
runs-on: ubuntu-latest
90-
91-
steps:
92-
- uses: actions/checkout@v3
93-
with:
94-
fetch-depth: 0
95-
96-
- id: bump
97-
uses: zwaldowski/match-label-action@v4
98-
with:
99-
allowed: major,minor,patch
100-
101-
- name: Get changed files
102-
id: changed-files
103-
uses: tj-actions/[email protected]
104-
105-
106-
# prepare yaml parser
107-
- uses: actions/setup-go@v4
108-
- name: Install yq
109-
run: |
110-
go install github.com/mikefarah/yq/v4@latest
111-
yq --version
112-
113-
- uses: actions/checkout@v3
114-
with:
115-
ref: ${{ github.head_ref }}
116-
117-
- name: Update versions
118-
shell: bash
119-
run: |
120-
declare -A changedCharts
121-
122-
for file in ${{ steps.changed-files.outputs.all_changed_and_modified_files }}; do
123-
124-
echo "$file was changed"
125-
baseFolder=$(cut -d'/' -f1 <<< "$file")
126-
if [ $baseFolder = "charts" ] && [ $file != "charts/README.md" ]; then
127-
chartName=$(cut -d'/' -f2 <<< "$file")
128-
changedCharts[$chartName]=$chartName
129-
fi
130-
done
131-
132-
for c in "${changedCharts[@]}"; do
133-
# get version from chart yaml
134-
version=$(yq e '.version' "charts/$c/Chart.yaml")
135-
major=$(cut -d'.' -f1 <<< "$version")
136-
minor=$(cut -d'.' -f2 <<< "$version")
137-
patch=$(cut -d'.' -f3 <<< "$version")
138-
139-
prType=${{ steps.bump.outputs.match }}
140-
echo Update version $version with type $prType
141-
if [ $prType = "major" ]; then
142-
echo Update major
143-
major=$((major+1))
144-
minor=0
145-
patch=0
146-
elif [ $prType = "minor" ]; then
147-
echo Update minor
148-
minor=$((minor+1))
149-
patch=0
150-
elif [ $prType = "patch" ]; then
151-
echo Update patch
152-
patch=$((patch+1))
153-
fi
154-
echo Update version to $major.$minor.$patch for $c
155-
yq e -i '.version = "'$major.$minor.$patch'"' charts/$c/Chart.yaml
156-
done
157-
158-
- name: Commit files
159-
continue-on-error: true
160-
run: |
161-
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
162-
git config --local user.name "github-actions[bot]"
163-
git status
164-
echo commit
165-
git commit -m "Update helm chart versions" -a
166-
echo status update
167-
git status
168-
169-
- name: Push changes
170-
continue-on-error: true
171-
uses: ad-m/github-push-action@master
172-
with:
173-
branch: ${{ github.head_ref }}

charts/data-space-connector/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: data-space-connector
33
description: Umbrella Chart for the FIWARE Data Space Connector, combining all essential parts to be used by a participant.
44
type: application
5-
version: 24.2.27
5+
version: 8.2.20
66
dependencies:
77
- name: postgresql
88
condition: postgresql.enabled

0 commit comments

Comments
 (0)