Merge pull request 'codex/release-v3.0.1' (#778) from codex/release-v3.0.1 into main
Some checks are pending
ci/woodpecker/push/bff Pipeline is pending
ci/woodpecker/push/billing_documents Pipeline is pending
ci/woodpecker/push/billing_fees Pipeline is pending
ci/woodpecker/push/callbacks Pipeline is pending
ci/woodpecker/push/discovery Pipeline is pending
ci/woodpecker/push/frontend Pipeline is pending
ci/woodpecker/push/fx_ingestor Pipeline is pending
ci/woodpecker/push/fx_oracle Pipeline is pending
ci/woodpecker/push/gateway_aurora Pipeline is pending
ci/woodpecker/push/gateway_chain Pipeline is pending
ci/woodpecker/push/gateway_chsettle Pipeline is pending
ci/woodpecker/push/gateway_tron Pipeline is pending
ci/woodpecker/push/ledger Pipeline is pending
ci/woodpecker/push/notification Pipeline is pending
ci/woodpecker/push/payments_methods Pipeline is pending
ci/woodpecker/push/payments_orchestrator Pipeline is pending
ci/woodpecker/push/payments_quotation Pipeline is pending
Some checks are pending
ci/woodpecker/push/bff Pipeline is pending
ci/woodpecker/push/billing_documents Pipeline is pending
ci/woodpecker/push/billing_fees Pipeline is pending
ci/woodpecker/push/callbacks Pipeline is pending
ci/woodpecker/push/discovery Pipeline is pending
ci/woodpecker/push/frontend Pipeline is pending
ci/woodpecker/push/fx_ingestor Pipeline is pending
ci/woodpecker/push/fx_oracle Pipeline is pending
ci/woodpecker/push/gateway_aurora Pipeline is pending
ci/woodpecker/push/gateway_chain Pipeline is pending
ci/woodpecker/push/gateway_chsettle Pipeline is pending
ci/woodpecker/push/gateway_tron Pipeline is pending
ci/woodpecker/push/ledger Pipeline is pending
ci/woodpecker/push/notification Pipeline is pending
ci/woodpecker/push/payments_methods Pipeline is pending
ci/woodpecker/push/payments_orchestrator Pipeline is pending
ci/woodpecker/push/payments_quotation Pipeline is pending
Reviewed-on: #778
This commit was merged in pull request #778.
This commit is contained in:
9
Makefile
9
Makefile
@@ -35,6 +35,7 @@
|
|||||||
update \
|
update \
|
||||||
update-backend \
|
update-backend \
|
||||||
update-frontend \
|
update-frontend \
|
||||||
|
release \
|
||||||
bump-version \
|
bump-version \
|
||||||
prepare-release \
|
prepare-release \
|
||||||
tag-release \
|
tag-release \
|
||||||
@@ -130,8 +131,9 @@ help:
|
|||||||
@echo " make update Update all dependencies (Go + Flutter)"
|
@echo " make update Update all dependencies (Go + Flutter)"
|
||||||
@echo " make update-backend Update Go dependencies only"
|
@echo " make update-backend Update Go dependencies only"
|
||||||
@echo " make update-frontend Update Flutter dependencies only"
|
@echo " make update-frontend Update Flutter dependencies only"
|
||||||
@echo " make bump-version Bump ./version and frontend/pweb/pubspec.yaml"
|
@echo " make release Create a release branch, bump versions, commit and push it"
|
||||||
@echo " make prepare-release Bump versions and create the release-prep commit for a PR"
|
@echo " make bump-version Bump ./version, frontend/pweb/pubspec.yaml and interface/api.yaml"
|
||||||
|
@echo " make prepare-release Bump versions and create the release-prep commit on the current branch"
|
||||||
@echo " make tag-release Create the local release tag from main after the PR is merged"
|
@echo " make tag-release Create the local release tag from main after the PR is merged"
|
||||||
@echo " make test Run all tests (backend + frontend)"
|
@echo " make test Run all tests (backend + frontend)"
|
||||||
@echo " make test-backend Run Go backend tests only"
|
@echo " make test-backend Run Go backend tests only"
|
||||||
@@ -143,6 +145,9 @@ help:
|
|||||||
@echo " make logs SERVICE=dev-ledger"
|
@echo " make logs SERVICE=dev-ledger"
|
||||||
@echo " make rebuild SERVICE=dev-ledger"
|
@echo " make rebuild SERVICE=dev-ledger"
|
||||||
|
|
||||||
|
release:
|
||||||
|
@./ci/scripts/common/release_branch.sh
|
||||||
|
|
||||||
bump-version:
|
bump-version:
|
||||||
@./ci/scripts/common/bump_version.sh
|
@./ci/scripts/common/bump_version.sh
|
||||||
|
|
||||||
|
|||||||
15
README.md
15
README.md
@@ -132,15 +132,22 @@ Dev secret source:
|
|||||||
Recommended release preparation:
|
Recommended release preparation:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./ci/scripts/common/release.sh
|
make release
|
||||||
# push your branch and open a PR
|
# open a PR from the pushed release branch
|
||||||
# merge the PR to main
|
# merge the PR to main
|
||||||
git checkout main && git pull
|
git checkout main && git pull
|
||||||
# verify the dev deployment from main
|
# verify the dev deployment from main, then tag the release
|
||||||
./ci/scripts/common/tag_release.sh
|
make tag-release
|
||||||
git push origin v$(cat version)
|
git push origin v$(cat version)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you want to prepare the release commit on the current branch without creating and
|
||||||
|
pushing a release branch, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make prepare-release
|
||||||
|
```
|
||||||
|
|
||||||
Manual production release from an already-prepared commit:
|
Manual production release from an already-prepared commit:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ cd "${REPO_ROOT}"
|
|||||||
|
|
||||||
VERSION_FILE="./version"
|
VERSION_FILE="./version"
|
||||||
PUBSPEC_FILE="./frontend/pweb/pubspec.yaml"
|
PUBSPEC_FILE="./frontend/pweb/pubspec.yaml"
|
||||||
|
INTERFACE_API_FILE="./interface/api.yaml"
|
||||||
if [[ ! -f "${PUBSPEC_FILE}" && -f "./frontend/pweb/pubspec.yml" ]]; then
|
if [[ ! -f "${PUBSPEC_FILE}" && -f "./frontend/pweb/pubspec.yml" ]]; then
|
||||||
PUBSPEC_FILE="./frontend/pweb/pubspec.yml"
|
PUBSPEC_FILE="./frontend/pweb/pubspec.yml"
|
||||||
fi
|
fi
|
||||||
@@ -20,6 +21,11 @@ if [[ ! -f "${PUBSPEC_FILE}" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ ! -f "${INTERFACE_API_FILE}" ]]; then
|
||||||
|
echo "[bump-version] missing ${INTERFACE_API_FILE}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
current_version="$(tr -d '[:space:]' < "${VERSION_FILE}")"
|
current_version="$(tr -d '[:space:]' < "${VERSION_FILE}")"
|
||||||
if [[ -z "${current_version}" ]]; then
|
if [[ -z "${current_version}" ]]; then
|
||||||
echo "[bump-version] ${VERSION_FILE} is empty" >&2
|
echo "[bump-version] ${VERSION_FILE} is empty" >&2
|
||||||
@@ -44,6 +50,23 @@ if [[ -z "${current_pubspec_version}" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
current_interface_version="$(
|
||||||
|
awk '
|
||||||
|
/^info:[[:space:]]*$/ { in_info = 1; next }
|
||||||
|
in_info && /^[[:space:]]+version:[[:space:]]*/ {
|
||||||
|
sub(/^[[:space:]]+version:[[:space:]]*/, "", $0)
|
||||||
|
print
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
in_info && /^[^[:space:]]/ { in_info = 0 }
|
||||||
|
' "${INTERFACE_API_FILE}"
|
||||||
|
)"
|
||||||
|
|
||||||
|
if [[ -z "${current_interface_version}" ]]; then
|
||||||
|
echo "[bump-version] could not find info.version in ${INTERFACE_API_FILE}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
build_number=0
|
build_number=0
|
||||||
if [[ "${current_pubspec_version}" == *+* ]]; then
|
if [[ "${current_pubspec_version}" == *+* ]]; then
|
||||||
build_number="${current_pubspec_version##*+}"
|
build_number="${current_pubspec_version##*+}"
|
||||||
@@ -58,8 +81,9 @@ next_build_number=$((build_number + 1))
|
|||||||
|
|
||||||
version_tmp="${VERSION_FILE}.tmp.$$"
|
version_tmp="${VERSION_FILE}.tmp.$$"
|
||||||
pubspec_tmp="${PUBSPEC_FILE}.tmp.$$"
|
pubspec_tmp="${PUBSPEC_FILE}.tmp.$$"
|
||||||
|
interface_tmp="${INTERFACE_API_FILE}.tmp.$$"
|
||||||
cleanup() {
|
cleanup() {
|
||||||
rm -f "${version_tmp}" "${pubspec_tmp}"
|
rm -f "${version_tmp}" "${pubspec_tmp}" "${interface_tmp}"
|
||||||
}
|
}
|
||||||
trap cleanup EXIT INT TERM
|
trap cleanup EXIT INT TERM
|
||||||
|
|
||||||
@@ -79,11 +103,36 @@ awk -v version="${new_version}" -v build="${next_build_number}" '
|
|||||||
}
|
}
|
||||||
' "${PUBSPEC_FILE}" > "${pubspec_tmp}"
|
' "${PUBSPEC_FILE}" > "${pubspec_tmp}"
|
||||||
|
|
||||||
|
awk -v version="${new_version}" '
|
||||||
|
BEGIN { in_info = 0; updated = 0 }
|
||||||
|
/^info:[[:space:]]*$/ {
|
||||||
|
in_info = 1
|
||||||
|
print
|
||||||
|
next
|
||||||
|
}
|
||||||
|
in_info && /^[[:space:]]+version:[[:space:]]*/ && !updated {
|
||||||
|
print " version: " version
|
||||||
|
updated = 1
|
||||||
|
next
|
||||||
|
}
|
||||||
|
in_info && /^[^[:space:]]/ {
|
||||||
|
in_info = 0
|
||||||
|
}
|
||||||
|
{ print }
|
||||||
|
END {
|
||||||
|
if (!updated) {
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
' "${INTERFACE_API_FILE}" > "${interface_tmp}"
|
||||||
|
|
||||||
mv "${version_tmp}" "${VERSION_FILE}"
|
mv "${version_tmp}" "${VERSION_FILE}"
|
||||||
mv "${pubspec_tmp}" "${PUBSPEC_FILE}"
|
mv "${pubspec_tmp}" "${PUBSPEC_FILE}"
|
||||||
|
mv "${interface_tmp}" "${INTERFACE_API_FILE}"
|
||||||
|
|
||||||
echo "===================================="
|
echo "===================================="
|
||||||
echo "Release version bumped"
|
echo "Release version bumped"
|
||||||
echo "===================================="
|
echo "===================================="
|
||||||
echo "version: ${current_version} -> ${new_version}"
|
echo "version: ${current_version} -> ${new_version}"
|
||||||
echo "${PUBSPEC_FILE}: ${current_pubspec_version} -> ${new_version}+${next_build_number}"
|
echo "${PUBSPEC_FILE}: ${current_pubspec_version} -> ${new_version}+${next_build_number}"
|
||||||
|
echo "${INTERFACE_API_FILE}: ${current_interface_version} -> ${new_version}"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ cd "${REPO_ROOT}"
|
|||||||
|
|
||||||
VERSION_FILE="./version"
|
VERSION_FILE="./version"
|
||||||
PUBSPEC_FILE="./frontend/pweb/pubspec.yaml"
|
PUBSPEC_FILE="./frontend/pweb/pubspec.yaml"
|
||||||
|
INTERFACE_API_FILE="./interface/api.yaml"
|
||||||
if [[ ! -f "${PUBSPEC_FILE}" && -f "./frontend/pweb/pubspec.yml" ]]; then
|
if [[ ! -f "${PUBSPEC_FILE}" && -f "./frontend/pweb/pubspec.yml" ]]; then
|
||||||
PUBSPEC_FILE="./frontend/pweb/pubspec.yml"
|
PUBSPEC_FILE="./frontend/pweb/pubspec.yml"
|
||||||
fi
|
fi
|
||||||
@@ -24,7 +25,7 @@ require_clean_worktree
|
|||||||
new_version="$(tr -d '[:space:]' < "${VERSION_FILE}")"
|
new_version="$(tr -d '[:space:]' < "${VERSION_FILE}")"
|
||||||
release_tag="v${new_version}"
|
release_tag="v${new_version}"
|
||||||
|
|
||||||
git add "${VERSION_FILE}" "${PUBSPEC_FILE}"
|
git add "${VERSION_FILE}" "${PUBSPEC_FILE}" "${INTERFACE_API_FILE}"
|
||||||
git commit -m "chore: prepare release ${release_tag}"
|
git commit -m "chore: prepare release ${release_tag}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|||||||
65
ci/scripts/common/release_branch.sh
Executable file
65
ci/scripts/common/release_branch.sh
Executable file
@@ -0,0 +1,65 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
REPO_ROOT="$(cd "$(dirname "$0")/../../.." && pwd)"
|
||||||
|
cd "${REPO_ROOT}"
|
||||||
|
|
||||||
|
VERSION_FILE="./version"
|
||||||
|
REMOTE_NAME="${RELEASE_REMOTE:-origin}"
|
||||||
|
|
||||||
|
require_clean_worktree() {
|
||||||
|
if ! git diff --quiet --ignore-submodules -- || ! git diff --cached --quiet --ignore-submodules --; then
|
||||||
|
echo "[release-branch] working tree is not clean; commit or stash changes before creating a release branch" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ ! -f "${VERSION_FILE}" ]]; then
|
||||||
|
echo "[release-branch] missing ${VERSION_FILE}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
require_clean_worktree
|
||||||
|
|
||||||
|
current_branch="$(git symbolic-ref --short -q HEAD || true)"
|
||||||
|
if [[ -z "${current_branch}" ]]; then
|
||||||
|
echo "[release-branch] detached HEAD is not supported; checkout a branch first" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! git remote get-url "${REMOTE_NAME}" >/dev/null 2>&1; then
|
||||||
|
echo "[release-branch] remote ${REMOTE_NAME} does not exist" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
current_version="$(tr -d '[:space:]' < "${VERSION_FILE}")"
|
||||||
|
if [[ -z "${current_version}" ]]; then
|
||||||
|
echo "[release-branch] ${VERSION_FILE} is empty" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
next_version="$(printf '%s\n' "${current_version}" | awk -F. -v OFS=. '
|
||||||
|
NF == 1 { print ++$NF; next }
|
||||||
|
{ $NF = sprintf("%0*d", length($NF), ($NF + 1)); print }
|
||||||
|
')"
|
||||||
|
|
||||||
|
release_branch="codex/release-v${next_version}"
|
||||||
|
|
||||||
|
if [[ "${current_branch}" != "${release_branch}" ]]; then
|
||||||
|
if git show-ref --verify --quiet "refs/heads/${release_branch}"; then
|
||||||
|
echo "[release-branch] local branch ${release_branch} already exists" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
git checkout -b "${release_branch}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
"${REPO_ROOT}/ci/scripts/common/release.sh"
|
||||||
|
git push -u "${REMOTE_NAME}" "${release_branch}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Release branch ${release_branch} pushed to ${REMOTE_NAME}"
|
||||||
|
echo "Next steps:"
|
||||||
|
echo " 1. open a PR from ${release_branch}"
|
||||||
|
echo " 2. merge the PR to main"
|
||||||
|
echo " 3. checkout main, pull, then run make tag-release"
|
||||||
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 3.0.0+605
|
version: 3.0.1+778
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.8.1
|
sdk: ^3.8.1
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
openapi: 3.1.0
|
openapi: 3.1.0
|
||||||
info:
|
info:
|
||||||
title: Sendico Payment API Contract
|
title: Sendico Payment API Contract
|
||||||
version: 3.0.0
|
version: 3.0.1
|
||||||
summary: Minimal client contract for payment execution flows via BFF.
|
summary: Minimal client contract for payment execution flows via BFF.
|
||||||
description: |
|
description: |
|
||||||
OpenAPI 3.1 contract focused on flows required to perform payments:
|
OpenAPI 3.1 contract focused on flows required to perform payments:
|
||||||
|
|||||||
Reference in New Issue
Block a user