Skip to content

Commit

Permalink
Auto check and update OTLP spec and its version
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Jun 9, 2023
1 parent 17e2c23 commit 511d23e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/auto-update-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
.github/workflows/scripts/auto-update-version.sh opentelemetry-java javaVersion content/en/docs/instrumentation/java/_index.md
.github/workflows/scripts/auto-update-version.sh opentelemetry-java-instrumentation javaInstrumentationVersion content/en/docs/instrumentation/java/automatic/annotations.md
.github/workflows/scripts/auto-update-version.sh opentelemetry-specification spec scripts/content-modules/adjust-pages.pl
.github/workflows/scripts/auto-update-version.sh opentelemetry-proto otlp scripts/content-modules/adjust-pages.pl
env:
# change this to secrets.GITHUB_TOKEN when testing against a fork
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
7 changes: 4 additions & 3 deletions .github/workflows/scripts/auto-update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,12 @@ if [ "$existing_pr_count" -gt 0 ]; then
exit 0
fi

if [[ "$repo" == "opentelemetry-specification" ]]; then
if [[ "$repo" == "opentelemetry-specification"
|| "$repo" == "opentelemetry-proto" ]]; then
echo "Switching to $repo at tag v$latest_version"
( set -x;
npm run get:submodule -- content-modules/opentelemetry-specification &&
cd content-modules/opentelemetry-specification &&
npm run get:submodule -- content-modules/$repo &&
cd content-modules/$repo &&
git fetch &&
git switch --detach v$latest_version
)
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"spelling": "cSpell:ignore docsy elemetry HTMLTEST hugo netlify prebuild precheck preinstall postbuild textlint -",
"spelling": "cSpell:ignore docsy elemetry HTMLTEST hugo netlify prebuild precheck preinstall postbuild postget textlint -",
"Notes": [
"The 'all' and 's' scripts are conveniences for use until the following",
"is fixed: https://github.com/mysticatea/npm-run-all/issues/209.",
Expand Down Expand Up @@ -41,6 +41,7 @@
"make:public": "make public ls-public",
"postbuild:preview": "npm run _check:links--warn",
"postbuild:production": "npm run _check:links--warn",
"postget:submodule": "git submodule",
"prebuild:preview": "run-s _prebuild",
"prebuild:production": "run-s _prebuild _check:format",
"prebuild": "npm run _prebuild",
Expand Down

0 comments on commit 511d23e

Please sign in to comment.