Skip to content

Commit

Permalink
Add en commit hashes and fix script
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Jun 7, 2024
1 parent 37bbbd6 commit 1481cb8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions content/ja/announcements/otel-community-day.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: OTel Community Day
date: 2024-04-05
expiryDate: 2024-06-25
weight: -1 # top
default_lang_commit: 788509efd404ba35dd113b4f37bae96ca7558e3e
---

<i class="fas fa-bullhorn"></i>
Expand Down
1 change: 1 addition & 0 deletions content/zh/announcements/otel-community-day.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: OTel Community Day
date: 2024-04-05
expiryDate: 2024-06-25
weight: -1 # top
default_lang_commit: 788509efd404ba35dd113b4f37bae96ca7558e3e
---

<i class="fas fa-bullhorn"></i>
Expand Down
6 changes: 5 additions & 1 deletion scripts/i18n-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,14 @@ function main() {
# Get commit hash from git commit info
LASTCOMMIT=$(git log -n 1 --pretty=format:%h -- "$f")
fi
if [[ -z $LASTCOMMIT ]]; then
if [[ -z $LASTCOMMIT ]] || ! git branch --contains $LASTCOMMIT | grep -q "^\s*main\b"; then
# Get last commit of `main` that this branch is rooted from.
LASTCOMMIT=$(git merge-base main HEAD)
fi
if ! git branch --contains $LASTCOMMIT | grep -q "^\s*main\b"; then
echo "Something is wrong, the hash isn't on 'main', aborting: $LASTCOMMIT"
exit 2
fi

if [[ -n $FLAG_UPDATE ]]; then
update_i18n_hash "$LASTCOMMIT" "$f"
Expand Down

0 comments on commit 1481cb8

Please sign in to comment.