Skip to content

Commit fd97d87

Browse files
committed
chore: fix automation to put new version on the end
1 parent ecf62fb commit fd97d87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

protoc/private/mirror_protoc_release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ python3 -c "import json; exec(open('$VERSIONS_BZL').read()); print(json.dumps(PR
7070

7171
# Locate the PROTOC_VERSIONS declaration in the source file and replace it with a merge of both data sources
7272
NEW=$(mktemp)
73-
sed '/PROTOC_VERSIONS =/Q' $VERSIONS_BZL > $NEW
73+
awk '/PROTOC_VERSIONS =/ {exit} {print}' $VERSIONS_BZL > $NEW
7474
echo -n "PROTOC_VERSIONS = " >> $NEW
75-
jq --slurp '.[0] * .[1]' $NEW_VERSION $EXISTING_VERSIONS >> $NEW
75+
jq --slurp '.[1] * .[0]' $NEW_VERSION $EXISTING_VERSIONS >> $NEW
7676
cp $NEW $VERSIONS_BZL
7777

7878
echo "Done, see updates in $VERSIONS_BZL"

0 commit comments

Comments
 (0)