diff --git a/.releaserc.yml b/.releaserc.yml index fc87b7d0..28490df2 100644 --- a/.releaserc.yml +++ b/.releaserc.yml @@ -55,6 +55,7 @@ plugins: - path: "./target/release/sha256sum.txt" - - "@semantic-release/git" - assets: + - README.md - CHANGELOG.md - version - go.mod diff --git a/scripts/bump-module.sh b/scripts/bump-module.sh index ca2f41b7..27eff381 100755 --- a/scripts/bump-module.sh +++ b/scripts/bump-module.sh @@ -13,15 +13,22 @@ if [ "${major_version}" -gt 1 ]; then go mod edit -module "${module_name_versioned}" echo "✅ module name updated to ${module_name_versioned} in go.mod" + sed_i_flag="" if [ "$(uname)" = "Darwin" ]; then - find . -type f -name "*.go" -exec \ - sed -i '' "s|\"${module_name}|\"${module_name_versioned}|g" {} \; + sed_i_flag=(-i '') else - find . -type f -name "*.go" -exec \ - sed -i "s|\"${module_name}|\"${module_name_versioned}|g" {} \; + sed_i_flag=(-i) fi - echo "✅ packages updated to ${module_name_versioned} in source files" + echo "⬆️ updating ${module_name} to ${module_name_versioned}..." + find . -type f \( -name "*.go" \) \ + -exec echo " - processing {}" \; \ + -exec sed "${sed_i_flag[@]}" "s|\"${module_name}|\"${module_name_versioned}|g" {} \; + + find . -type f \( -name "README.md" \) \ + -exec echo " - processing {}" \; \ + -exec sed "${sed_i_flag[@]}" "s|${module_name}|${module_name_versioned}|g" {} \; + echo "✅ packages updated to ${module_name_versioned} in source files" echo "🧹 cleaning up go.sum" go mod tidy else