From 4242ac8172fc0a6c21934feefef66a21563a7098 Mon Sep 17 00:00:00 2001 From: ccamel Date: Mon, 23 Dec 2024 13:31:50 +0100 Subject: [PATCH 1/2] docs(README): add go Doc and go Report Card badges --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7d8d6855..1c5ebe26 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![axone github banner](https://raw.githubusercontent.com/axone-protocol/.github/main/profile/static/axone-banner.png)](https://axone.xyz)

-   +         @@ -14,8 +14,10 @@ [![build](https://img.shields.io/github/actions/workflow/status/axone-protocol/axoned/build.yml?label=build&style=for-the-badge&logo=github)](https://github.com/axone-protocol/axoned/actions/workflows/build.yml) [![test](https://img.shields.io/github/actions/workflow/status/axone-protocol/axoned/test.yml?label=test&style=for-the-badge&logo=github)](https://github.com/axone-protocol/axoned/actions/workflows/test.yml) [![codecov](https://img.shields.io/codecov/c/github/axone-protocol/axoned?style=for-the-badge&token=O3FJO5QDCA&logo=codecov)](https://codecov.io/gh/axone-protocol/axoned) +[![Go Report Card](https://goreportcard.com/badge/github.com/axone-protocol/axoned/v11?style=for-the-badge)](https://goreportcard.com/report/github.com/axone-protocol/axoned/v11) [![docker-pull](https://img.shields.io/docker/pulls/axoneprotocol/axoned?label=downloads&style=for-the-badge&logo=docker)](https://hub.docker.com/r/axoneprotocol/axoned) -[![discord](https://img.shields.io/discord/946759919678406696.svg?label=discord&logo=discord&logoColor=white&style=for-the-badge)](https://discord.gg/axone) +[![Godoc Reference](https://img.shields.io/badge/godoc-reference-blue.svg?logo=go&logoColor=white&labelColor=gray&label=&style=for-the-badge)](https://pkg.go.dev/github.com/axone-protocol/axoned/v11) + [![conventional commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=for-the-badge&logo=conventionalcommits)](https://conventionalcommits.org) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge)](https://github.com/semantic-release/semantic-release) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg?style=for-the-badge)](https://github.com/axone-protocol/.github/blob/main/CODE_OF_CONDUCT.md) From 5ece0c35191a79ae6b30e2d5a317da375400ece2 Mon Sep 17 00:00:00 2001 From: ccamel Date: Mon, 23 Dec 2024 13:49:51 +0100 Subject: [PATCH 2/2] ci(release): include README.md in version update --- .releaserc.yml | 1 + scripts/bump-module.sh | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) 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