A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
fix(ci): changelog tries to run hash values
aminnausin99bfb461bea5
diff --git a/.github/workflows/generate-changelog.yml b/.github/workflows/generate-changelog.ymlindex c64386d7..651addc4 100644--- a/.github/workflows/generate-changelog.yml+++ b/.github/workflows/generate-changelog.yml@@ -91,34 +91,39 @@ jobs:# if there are matches, write out with scope under the titleif [ -n "$MATCHES" ]; then- echo "### $TITLE" >> $CHANGELOG_FILE- echo "" >> $CHANGELOG_FILE+ echo "### $TITLE" >> $CHANGELOG_FILE+ echo "" >> $CHANGELOG_FILE- printf "%s\n" "$MATCHES" | while IFS=$'\t' read -r msg hash; do- if echo "$msg" | grep -Eq '^[a-zA-Z_]+!?\\([^)]+\\):'; then- scope=$(echo "$msg" | sed -nE 's/^[a-zA-Z_]+!?\(([^)]+)\).*/\1/p')- scope="**$scope:** "- else- scope=""- fi+ printf "%s\n" "$MATCHES" | while IFS=$'\t' read -r msg hash; do+ if echo "$msg" | grep -Eq '^[a-zA-Z_]+!?\\([^)]+\\):'; then+ scope=$(echo "$msg" | sed -nE 's/^[a-zA-Z_]+!?\(([^)]+)\).*/\1/p')+ scope="**$scope:** "+ else+ scope=""+ fi- clean_msg=$(echo "$msg" | sed -E 's/^[a-zA-Z_]+!?(\([^)]+\))?:[[:space:]]*//')+ clean_msg=$(echo "$msg" | sed -E 's/^[a-zA-Z_]+!?(\([^)]+\))?:[[:space:]]*//')- # - scope:msg (hash)- echo "- $scope$clean_msg (\`$hash\`)" >> $CHANGELOG_FILE- done+ # - scope:msg (hash)+ printf -- "- %s%s (\`%s\`)\n" "$scope" "$clean_msg" "$hash" >> "$CHANGELOG_FILE"+ done- echo "" >> $CHANGELOG_FILE+ echo "" >> $CHANGELOG_FILEfi}# write each section- write_section "π Features" "^feat(\(.+\))?:"+ write_section "β¨ Features" "^feat(\(.+\))?:"write_section "π Bug Fixes" "^fix(\(.+\))?:"- write_section "π Performance" "^perf(\(.+\))?:"- write_section "π Refactors" "^refactor(\(.+\))?:"- write_section "π Documentation" "^docs(\(.+\))?:"+ write_section "β‘ Performance" "^perf(\(.+\))?:"+ write_section "π Security" "^security(\(.+\))?:"+ write_section "β»οΈ Refactoring" "^refactor(\(.+\))?:"+ write_section "π Documentation" "^docs(\(.+\))?:"+ write_section "π¨ Styling" "^style(\(.+\))?:"+ write_section "π§ͺ Testing" "^test(\(.+\))?:"write_section "π§ Maintenance" "^chore(\(.+\))?:"+ write_section "βοΈ CI/CD" "^ci(\(.+\))?:"+ write_section "βοΈ Reverts" "^revert(\(.+\))?:"# write breaking section separately to handle commits and commit descriptionsBREAKING=$(echo "$COMMITS" | grep -E "^[a-z_]+!|BREAKING CHANGE" || true)@@ -127,8 +132,8 @@ jobs:echo "" >> $CHANGELOG_FILEprintf "%s\n" "$BREAKING" | while IFS=$'\t' read -r msg hash; do- clean_msg=$(echo "$msg" | sed -E 's/^[a-z_]+!?\([^)]+\)?:\s*//')- echo "- $clean_msg (\`$hash\`)" >> $CHANGELOG_FILE+ clean_msg=$(echo "$msg" | sed -E 's/^[a-z_]+!?\([^)]+\)?:\s*//')+ printf -- "- %s%s (\`%s\`)\n" "$scope" "$clean_msg" "$hash" >> "$CHANGELOG_FILE"doneecho "" >> $CHANGELOG_FILE@@ -138,9 +143,9 @@ jobs:# write to github output and changelog file (file unused){- echo "CHANGELOG<<EOF"+ echo "CHANGELOG<<CHANGELOG_EOF"cat $CHANGELOG_FILE- echo "EOF"+ echo "CHANGELOG_EOF"} >> $GITHUB_OUTPUTif [ -f "CHANGELOG.md" ]; thendiff --git a/changelog.sh b/changelog.shindex 85782fb3..93a9866d 100644--- a/changelog.sh+++ b/changelog.sh@@ -47,55 +47,54 @@ write_section() {TITLE="$1"PATTERN="$2"-- echo $title- echo $(printf "%s\n" "$COMMITS" | grep -E "$PATTERN" || true)- echo ""- echo $(echo "$COMMITS" | grep -E "$PATTERN" || true)-# matches commits to the given patternMATCHES=$(printf "%s\n" "$COMMITS" | grep -E "$PATTERN" || true)# if there are matches, write out with scope under the titleif [ -n "$MATCHES" ]; then- echo "### $TITLE" >> $CHANGELOG_FILE- echo "" >> $CHANGELOG_FILE+ echo "### $TITLE" >> $CHANGELOG_FILE+ echo "" >> $CHANGELOG_FILE- printf "%s\n" "$MATCHES" | while IFS=$'\t' read -r msg hash; do- if echo "$msg" | grep -Eq '^[a-zA-Z_]+!?\\([^)]+\\):'; then- scope=$(echo "$msg" | sed -nE 's/^[a-zA-Z_]+!?\(([^)]+)\).*/\1/p')- scope="**$scope:** "- else- scope=""- fi+ printf "%s\n" "$MATCHES" | while IFS=$'\t' read -r msg hash; do+ if echo "$msg" | grep -Eq '^[a-zA-Z_]+!?\\([^)]+\\):'; then+ scope=$(echo "$msg" | sed -nE 's/^[a-zA-Z_]+!?\(([^)]+)\).*/\1/p')+ scope="**$scope:** "+ else+ scope=""+ fi- clean_msg=$(echo "$msg" | sed -E 's/^[a-zA-Z_]+!?(\([^)]+\))?:[[:space:]]*//')+ clean_msg=$(echo "$msg" | sed -E 's/^[a-zA-Z_]+!?(\([^)]+\))?:[[:space:]]*//')- # - scope- echo "- $scope$clean_msg (\`$hash\`)" >> $CHANGELOG_FILE- done+ # - scope:msg (hash)+ printf -- "- %s%s (\`%s\`)\n" "$scope" "$clean_msg" "$hash" >> "$CHANGELOG_FILE"+ done- echo "" >> $CHANGELOG_FILE+ echo "" >> $CHANGELOG_FILEfi}-# Sections-write_section "π Features" "^feat(\(.+\))?:"+# write each section+write_section "β¨ Features" "^feat(\(.+\))?:"write_section "π Bug Fixes" "^fix(\(.+\))?:"-write_section "π Performance" "^perf(\(.+\))?:"-write_section "π Refactors" "^refactor(\(.+\))?:"-write_section "π Documentation" "^docs(\(.+\))?:"+write_section "β‘ Performance" "^perf(\(.+\))?:"+write_section "π Security" "^security(\(.+\))?:"+write_section "β»οΈ Refactoring" "^refactor(\(.+\))?:"+write_section "π Documentation" "^docs(\(.+\))?:"+write_section "π¨ Styling" "^style(\(.+\))?:"+write_section "π§ͺ Testing" "^test(\(.+\))?:"write_section "π§ Maintenance" "^chore(\(.+\))?:"+write_section "βοΈ CI/CD" "^ci(\(.+\))?:"+write_section "βοΈ Reverts" "^revert(\(.+\))?:"-# Breaking changes+# write breaking section separately to handle commits and commit descriptionsBREAKING=$(echo "$COMMITS" | grep -E "^[a-z_]+!|BREAKING CHANGE" || true)if [ -n "$BREAKING" ]; thenecho "### π¨ Breaking Changes" >> $CHANGELOG_FILEecho "" >> $CHANGELOG_FILEprintf "%s\n" "$BREAKING" | while IFS=$'\t' read -r msg hash; do- clean_msg=$(echo "$msg" | sed -E 's/^[a-z_]+!?\([^)]+\)?:\s*//')- echo "- $clean_msg (\`$hash\`)" >> $CHANGELOG_FILE+ clean_msg=$(echo "$msg" | sed -E 's/^[a-z_]+!?\([^)]+\)?:\s*//')+ printf -- "- %s%s (\`%s\`)\n" "$scope" "$clean_msg" "$hash" >> "$CHANGELOG_FILE"doneecho "" >> $CHANGELOG_FILE