diff --git a/CHANGELOG.md b/CHANGELOG.md index f114c7748..3c98c330f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,21 @@ All releases and the changes included in them (pulled from git commits added sin - 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 +- ca279e10 Update changelog format +- a553cce0 fixed the ingress alignment +- c78a3a5b small spelling fix and add log delition and garbage collection history +- 52b24a6d harbor clean up doc +- ca004f96 Fixed cilium template condition +- 044ed1b6 Added a readme file for azure cluster api +- 2e5db425 fix: fixed the env and secret name as per new object name for puppetserver +- 86a3774a fix: added namespace support to postgresql puppetserver +- 334bfb84 fixes: +- 62e841a7 Added a helm chart for azure cluster api +- 98f94caa Fixed Yaml linting +- d6f40a65 Added capz version +- edf3a588 Added Azure capz helm chart +- 5c93bc15 setup matomo in k8s ## 1.1.0 ### Minor Changes diff --git a/bin/add-commits.sh b/bin/add-commits.sh new file mode 100755 index 000000000..1b0be6f20 --- /dev/null +++ b/bin/add-commits.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# Get the latest tag from the changelog file +changelog_file="CHANGELOG.md" +latest_tag=$(grep -oP '^## \K[0-9]+\.[0-9]+\.[0-9]+' "$changelog_file" | head -n1) + +echo "$latest_tag" + +# Get the commit log since the latest tag +commit_log=$(git log "$latest_tag"..origin/master --oneline --no-merges) + +# Format the commit log into bullet points +formatted_commit_log=$(echo "$commit_log" | awk '{print "- " $0}') # to keep sha in front +# formatted_commit_log=$(echo "$commit_log" | awk '{sha=$1; $1=""; print "-" $0" "sha}') # to keep sha later + +# Create a temporary file for the formatted commit log +temp_file="temp.md" +{ + echo "### KubeAid Improvements" + echo "$formatted_commit_log" + echo "" +} > "$temp_file" + +# Update the changelog file +awk -v tag="## ${latest_tag}" -v file="$temp_file" ' + $0 == tag { + while ((getline line < file) > 0) { + print line + } + } + { print } +' "$changelog_file" > "${changelog_file}.tmp" && mv "${changelog_file}.tmp" "$changelog_file" + +rm "$temp_file" + +commit_msg="Add commit since ${latest_tag} tag to CHANGELOG.md" + +git add CHANGELOG.md +git commit -m "$commit_msg" diff --git a/bin/helm-repo-update.sh b/bin/helm-repo-update.sh index 24d0e7643..0a2df2c10 100755 --- a/bin/helm-repo-update.sh +++ b/bin/helm-repo-update.sh @@ -25,6 +25,7 @@ Usage $0 [OPTIONS]: --actions Run inside a GitHub or Gitea Action [Default: false] (Only in CI) --skip-charts Skip updating certain charts [Default: none] --chart-version Helm chart version [Default: latest] + --add-commits Add commits since last tag in changelog [Default: false] -h|--help Example: @@ -40,6 +41,7 @@ declare UPDATE_HELM_CHART= declare SKIP_CHARTS= declare ARGOCD_CHART_PATH="argocd-helm-charts" declare CHART_VERSION= +declare ADD_COMMITS=false [ $# -eq 0 ] && { ARGFAIL; exit 1; } @@ -77,6 +79,9 @@ while [[ $# -gt 0 ]]; do shift ;; + --add-commits) + ADD_COMMITS=true + ;; -h|--help) ARGFAIL exit @@ -292,7 +297,7 @@ 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 %%^^\n" 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 fi @@ -347,6 +352,11 @@ if "$UPDATE_ALL"; then if [ "$ACTIONS" = false ]; then git switch -c "$branch_name" --track origin/master fi + + if $ADD_COMMITS; then + bash ./bin/add-commits.sh + fi + while read -r path; do # find ./"$ARGOCD_CHART_PATH" -maxdepth 1 -mindepth 1 -type d | sort | while read -r path; do chart_name=$(basename "$path")