Skip to content

Commit

Permalink
Update spec badge via script
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopgrassi committed Nov 23, 2023
1 parent 091cdc8 commit 634823f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/tools/update_specification_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ LATEST_SPECIFICATION_VERSION="v1.26.0"
# The specific pattern we look for when replacing URLs
SPECIFICATION_URL_PREFIX="https://github.com/open-telemetry/opentelemetry-specification/tree/"
SPECIFICATION_BLOB_URL_PREFIX="https://github.com/open-telemetry/opentelemetry-specification/blob/"
# The specific pattern we look for updating the Badge with the spec version
SPECIFICATION_BADGE_PREFIX="https://img.shields.io/badge/Specification_version-"


fix_file() {
echo Fixing file $1
sed -i \
-e "s,${SPECIFICATION_URL_PREFIX}${PREVIOUS_SPECIFICATION_VERSION},${SPECIFICATION_URL_PREFIX}${LATEST_SPECIFICATION_VERSION},g" \
-e "s,${SPECIFICATION_BLOB_URL_PREFIX}${PREVIOUS_SPECIFICATION_VERSION},${SPECIFICATION_URL_PREFIX}${LATEST_SPECIFICATION_VERSION},g" \
-e "s,${SPECIFICATION_BADGE_PREFIX}${PREVIOUS_SPECIFICATION_VERSION},${SPECIFICATION_BADGE_PREFIX}${LATEST_SPECIFICATION_VERSION},g" \
"$1"
}

Expand Down

0 comments on commit 634823f

Please sign in to comment.