Skip to content

PostgreSQL backup tool with Point-In-Time-Recovery and restore verification

FIX (releases): Fix version generation

Rostislav Duginb94d927dce33
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index a84d3928..83a7a373 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -130,18 +130,34 @@ jobs:
COMMIT_DATE=$(echo "$line" | cut -d'|||' -f4)
SHORT_HASH=${COMMIT_HASH:0:7}
- if [[ "$COMMIT_MSG" =~ ^FEATURE[[:space:]]*\(([^)]+)\):[[:space:]]*(.*) ]]; then
- AREA="${BASH_REMATCH[1]}"
- DESC="${BASH_REMATCH[2]}"
- FEATURES="${FEATURES}- **${AREA}**: ${DESC} ([${SHORT_HASH}](https://github.com/${{ github.repository }}/commit/${COMMIT_HASH}))\n"
- elif [[ "$COMMIT_MSG" =~ ^FIX[[:space:]]*\(([^)]+)\):[[:space:]]*(.*) ]]; then
- AREA="${BASH_REMATCH[1]}"
- DESC="${BASH_REMATCH[2]}"
- FIXES="${FIXES}- **${AREA}**: ${DESC} ([${SHORT_HASH}](https://github.com/${{ github.repository }}/commit/${COMMIT_HASH}))\n"
- elif [[ "$COMMIT_MSG" =~ ^REFACTOR[[:space:]]*\(([^)]+)\):[[:space:]]*(.*) ]]; then
- AREA="${BASH_REMATCH[1]}"
- DESC="${BASH_REMATCH[2]}"
- REFACTORS="${REFACTORS}- **${AREA}**: ${DESC} ([${SHORT_HASH}](https://github.com/${{ github.repository }}/commit/${COMMIT_HASH}))\n"
+ # Parse commit message format: TYPE (area): description
+ if [[ "$COMMIT_MSG" == FEATURE* ]]; then
+ # Extract area and description
+ TEMP="${COMMIT_MSG#FEATURE}"
+ TEMP="${TEMP#"${TEMP%%[![:space:]]*}"}" # trim leading spaces
+ if [[ "$TEMP" == \(* ]]; then
+ AREA=$(echo "$TEMP" | sed 's/^(\([^)]*\)).*/\1/')
+ DESC=$(echo "$TEMP" | sed 's/^([^)]*):[[:space:]]*//')
+ FEATURES="${FEATURES}- **${AREA}**: ${DESC} ([${SHORT_HASH}](https://github.com/${{ github.repository }}/commit/${COMMIT_HASH}))\n"
+ fi
+ elif [[ "$COMMIT_MSG" == FIX* ]]; then
+ # Extract area and description
+ TEMP="${COMMIT_MSG#FIX}"
+ TEMP="${TEMP#"${TEMP%%[![:space:]]*}"}" # trim leading spaces
+ if [[ "$TEMP" == \(* ]]; then
+ AREA=$(echo "$TEMP" | sed 's/^(\([^)]*\)).*/\1/')
+ DESC=$(echo "$TEMP" | sed 's/^([^)]*):[[:space:]]*//')
+ FIXES="${FIXES}- **${AREA}**: ${DESC} ([${SHORT_HASH}](https://github.com/${{ github.repository }}/commit/${COMMIT_HASH}))\n"
+ fi
+ elif [[ "$COMMIT_MSG" == REFACTOR* ]]; then
+ # Extract area and description
+ TEMP="${COMMIT_MSG#REFACTOR}"
+ TEMP="${TEMP#"${TEMP%%[![:space:]]*}"}" # trim leading spaces
+ if [[ "$TEMP" == \(* ]]; then
+ AREA=$(echo "$TEMP" | sed 's/^(\([^)]*\)).*/\1/')
+ DESC=$(echo "$TEMP" | sed 's/^([^)]*):[[:space:]]*//')
+ REFACTORS="${REFACTORS}- **${AREA}**: ${DESC} ([${SHORT_HASH}](https://github.com/${{ github.repository }}/commit/${COMMIT_HASH}))\n"
+ fi
fi
fi
done <<< "$COMMITS"
diff --git a/contribute/README.md b/contribute/README.md
index 6b3cd045..217cf1b0 100644
--- a/contribute/README.md
+++ b/contribute/README.md
@@ -86,8 +86,7 @@ Notifications flow:
Extra:
-- add versioning instead of :latest (in progress by Rostislav Dugin)
-- add tests running on each PR
+- add tests running on each PR (in progress by Rostislav Dugin)
- add prettier labels to GitHub README
- create pretty website like rybbit.io with demo
- add HTTPS for Postgresus