Skip to content

Commit

Permalink
Update titles in CHANGELOG, script and add patch dump codition when n…
Browse files Browse the repository at this point in the history
…o helm updates are available since last update
  • Loading branch information
Hritik Batra committed Sep 2, 2024
1 parent 4cc5913 commit a6d60f6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
22 changes: 11 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
All releases and the changes included in them (pulled from git commits added since last release) will be detailed in this file.

## 1.3.0
### Minor Changes
### Minor Version Upgrades
- Updated traefik from version 30.0.2 to 30.1.0
- Updated rook-ceph-cluster from version v1.14.9 to v1.15.0
- Updated rook-ceph from version v1.14.9 to v1.15.0
Expand All @@ -18,7 +18,7 @@ All releases and the changes included in them (pulled from git commits added sin
- Updated cloudnative-pg from version 0.21.6 to 0.22.0
- Updated cerebro from version 2.0.5 to 2.1.0

### Patch Changes
### Patch Version Upgrades
- Updated velero from version 7.1.4 to 7.1.5
- Updated teleport-kube-agent from version 16.1.4 to 16.1.7
- Updated teleport-cluster from version 16.1.4 to 16.1.7
Expand All @@ -33,7 +33,7 @@ All releases and the changes included in them (pulled from git commits added sin
- Updated cert-manager from version v1.15.2 to v1.15.3
- Updated argo-cd from version 7.4.2 to 7.4.5

### KubeAid Improvements
### Improvements
- f931fffe updated the prometheus metrics alert to handle boot time as well
- 44a0e0ec Add add-commit bash script and call it in helm-repo-update script and update CHANGELOG with commits as per new standard
- a3293137 refactor: Update TCP ingress route for puppetdb to use new domain name
Expand Down Expand Up @@ -85,20 +85,20 @@ All releases and the changes included in them (pulled from git commits added sin
- 334bfb84 fixes:

## 1.2.0
### Minor Changes
### Minor Version Upgrades
- Updated opensearch-dashboards from version 2.19.1 to 2.20.0
- Updated opensearch from version 2.21.0 to 2.22.0
- Updated community-operator from version 0.10.0 to 0.11.0

### Patch Changes
### Patch Version Upgrades
- Updated teleport-kube-agent from version 16.1.3 to 16.1.4
- Updated teleport-cluster from version 16.1.3 to 16.1.4
- Updated rabbitmq-cluster-operator from version 4.3.17 to 4.3.18
- Updated metallb from version 6.3.9 to 6.3.10
- Updated aws-efs-csi-driver from version 3.0.7 to 3.0.8
- Updated argo-cd from version 7.4.1 to 7.4.2

### KubeAid Improvements
### Improvements
- ca279e10 Update changelog format
- a553cce0 fixed the ingress alignment
- c78a3a5b small spelling fix and add log delition and garbage collection history
Expand All @@ -115,12 +115,12 @@ All releases and the changes included in them (pulled from git commits added sin
- 5c93bc15 setup matomo in k8s

## 1.1.0
### Minor Changes
### Minor Version Upgrades
- Updated keda from version 2.14.2 to 2.15.0
- Updated cluster-api-operator from version 0.11.0 to 0.12.0
- Updated argo-cd from version 7.3.11 to 7.4.1

### Patch Changes
### Patch Version Upgrades
- Updated teleport-kube-agent from version 16.1.0 to 16.1.3
- Updated teleport-cluster from version 16.1.0 to 16.1.3
- Updated reloader from version 1.0.119 to 1.0.121
Expand All @@ -131,20 +131,20 @@ All releases and the changes included in them (pulled from git commits added sin
- Updated dokuwiki from version 16.2.10 to 16.2.11

## 1.0.0
### Major Changes
### Major Version Upgrades
- Updated: matomo from version 7.3.7 to 8.0.5
- Updated: redmine from version 28.2.7 to 29.0.3
- Updated: traefik from version 29.0.0 to 30.0.2

### Minor Changes
### Minor Version Upgrades
- Updated: aws-ebs-csi-driver from version 2.32.0 to 2.33.0
- Updated: cilium from version 1.15.6 to 1.16.0
- Updated: external-dns from version 8.1.0 to 8.3.3
- Updated: fluent-bit from version 0.46.11 to 0.47.5
- Updated: gitlab-runner from version 0.66.0 to 0.67.1
- Updated: opencost from version 1.40.0 to 1.41.0

### Patch Changes
### Patch Version Upgrades
- Updated: argo-cd from version 7.3.4 to 7.3.11
- Updated: aws-efs-csi-driver from version 3.0.6 to 3.0.7
- Updated: cert-manager from version v1.15.1 to v1.15.2
Expand Down
2 changes: 1 addition & 1 deletion bin/add-commits.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ formatted_commit_log=$(echo "$commit_log" | awk '{print "- " $0}') # to keep sha
# Create a temporary file for the formatted commit log
temp_file="temp.md"
{
echo "### KubeAid Improvements"
echo "### Improvements"
echo "$formatted_commit_log"
echo ""
} > "$temp_file"
Expand Down
24 changes: 14 additions & 10 deletions bin/helm-repo-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -297,21 +297,21 @@ EOF
# Check if the current date section exists
if ! grep -q "^## $date" "$changelog_file"; then
sed -i "/All releases and the changes included in them (pulled from git commits added since last release) will be detailed in this file./a\\\n## $date" CHANGELOG.md
sed -i "/$date/a\\### Patch Changes %%^^" CHANGELOG.md
sed -i "/$date/a\\### Minor Changes %%^^\n" CHANGELOG.md
sed -i "/$date/a\\### Major Changes %%^^\n" CHANGELOG.md
sed -i "/$date/a\\### Patch Version Upgrades %%^^" CHANGELOG.md
sed -i "/$date/a\\### Minor Version Upgrades %%^^\n" CHANGELOG.md
sed -i "/$date/a\\### Major Version Upgrades %%^^\n" CHANGELOG.md
fi

# Add the new entry under the appropriate section under the current date
case "$change_type" in
major)
sed -i "/### Major Changes %%^^/a\\- $message" "$changelog_file"
sed -i "/### Major Version Upgrades %%^^/a\\- $message" "$changelog_file"
;;
minor)
sed -i "/### Minor Changes %%^^/a\\- $message" "$changelog_file"
sed -i "/### Minor Version Upgrades %%^^/a\\- $message" "$changelog_file"
;;
patch)
sed -i "/### Patch Changes %%^^/a\\- $message" "$changelog_file"
sed -i "/### Patch Version Upgrades %%^^/a\\- $message" "$changelog_file"
;;
*)
echo "Invalid change type: $change_type"
Expand Down Expand Up @@ -389,16 +389,20 @@ if "$UPDATE_ALL"; then
# Remove Chnages heading markers
sed -i 's/ %%\^\^//g' CHANGELOG.md
# Remove empty sections
sed -i '/### Major Changes/{N;/### Major Changes\n$/d;}' CHANGELOG.md
sed -i '/### Minor Changes/{N;/### Minor Changes\n$/d;}' CHANGELOG.md
sed -i '/### Patch Changes/{N;/### Patch Changes\n$/d;}' CHANGELOG.md
sed -i '/### Major Version Upgrades/{N;/### Major Version Upgrades\n$/d;}' CHANGELOG.md
sed -i '/### Minor Version Upgrades/{N;/### Minor Version Upgrades\n$/d;}' CHANGELOG.md
sed -i '/### Patch Version Upgrades/{N;/### Patch Version Upgrades\n$/d;}' CHANGELOG.md

if $PULL_REQUEST; then
git add CHANGELOG.md
git commit -m "Update to new tag for Kubeaid"
fi
else
echo "The current date entry '$date' is not found in CHANGELOG.md"
bump_type="patch"
current_ver="$(get_current_version)"

new_ver="$(bump_version "$current_ver" "$bump_type")"
sed -i "0,/### Improvements/{s/### Improvements/## $new_ver\n### Improvements/}" CHANGELOG.md
fi
fi

Expand Down

0 comments on commit a6d60f6

Please sign in to comment.