Fix `update-swift-syntax.sh` script (#4604)

This commit is contained in:
JP Simard 2022-11-29 15:07:37 -05:00 committed by GitHub
parent 97ba82d740
commit e405d3d583
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@
set -euo pipefail
readonly old_commit="$(grep "apple/swift-syntax" Package.swift | sed -nr 's/.*revision: \"([a-f0-9]{40})\"),$/\1/p')"
readonly old_commit="$(grep "apple/swift-syntax" Package.swift | sed -nr 's/.*revision: \"([a-f0-9]{40})\"\),$/\1/p')"
if [ $# -eq 0 ]; then
readonly new_commit="$(curl -s -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.VERSION.sha" "https://api.github.com/repos/apple/swift-syntax/commits/main")"
else