Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion scripts/pre-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,17 @@ function bumpVersion() {
if [[ "${DRY_RUN}" == "true" ]]; then
echo "sed \"s/testcontainers-go v.*/testcontainers-go v${versionToBumpWithoutV}/g\" ${module_mod_file} > ${module_mod_file}.tmp"
echo "mv ${module_mod_file}.tmp ${module_mod_file}"

# Log inter-module dependencies
echo "sed \"s/github\.com\/testcontainers\/testcontainers-go\/modules\/\([a-zA-Z0-9_-]*\) v.*/github.com\/testcontainers\/testcontainers-go\/modules\/\1 v${versionToBumpWithoutV}/g\" ${module_mod_file} > ${module_mod_file}.tmp"
echo "mv ${module_mod_file}.tmp ${module_mod_file}"
else
sed "s/testcontainers-go v.*/testcontainers-go v${versionToBumpWithoutV}/g" ${module_mod_file} > ${module_mod_file}.tmp
mv ${module_mod_file}.tmp ${module_mod_file}

# Update inter-module dependencies
sed "s/github\.com\/testcontainers\/testcontainers-go\/modules\/\([a-zA-Z0-9_-]*\) v.*/github.com\/testcontainers\/testcontainers-go\/modules\/\1 v${versionToBumpWithoutV}/g" ${module_mod_file} > ${module_mod_file}.tmp
mv ${module_mod_file}.tmp ${module_mod_file}
fi
done

Expand All @@ -68,7 +76,7 @@ function bumpVersion() {
RELEASED_STRING="Since <a href=\\\"https:\/\/github.com\/testcontainers\/testcontainers-go\/releases\/tag\/v${versionEscapingDots}\\\"><span class=\\\"tc-version\\\">:material-tag: v${versionEscapingDots}<\/span><\/a>"

# find all markdown files, and for each of them, replace the release string
find . -name "*.md" | while read -r module_file; do
find . -name "*.md" -not -name "contributing.md" | while read -r module_file; do
if [[ "${DRY_RUN}" == "true" ]]; then
echo "sed \"s/${NON_RELEASED_STRING}/${RELEASED_STRING}/g\" ${module_file} > ${module_file}.tmp"
echo "mv ${module_file}.tmp ${module_file}"
Expand Down
Loading