File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -36,27 +36,28 @@ jobs:
3636 set -ex
3737
3838 git fetch
39- branch=$branch
39+ branch=ci/update-swift-version
4040 if git ls-remote --exit-code --heads origin "$branch"; then
4141 git checkout -b "$branch" --track "origin/$branch"
4242 else
4343 git checkout -b "$branch"
4444 fi
4545
46- UNAME =$(uname -m)
47- curl -O "https://download.swift.org/swiftly/linux/swiftly-$UNAME .tar.gz"
48- tar zxf "swiftly-$UNAME .tar.gz"
46+ uname =$(uname -m)
47+ curl -O "https://download.swift.org/swiftly/linux/swiftly-$uname .tar.gz"
48+ tar zxf "swiftly-$uname .tar.gz"
4949 ./swiftly init \
5050 --skip-install \
5151 --assume-yes \
5252 --quiet-shell-followup \
5353 --no-modify-profile
5454 . "$HOME/.local/share/swiftly/env.sh"
5555
56+ swift_version=".swift-version"
5657 latest=$(swiftly list-available main-snapshot | grep main-snapshot | head -n 1 | awk '{print $1}')
57- echo -n "$latest" > .swift-version
58+ echo -n "$latest" > "$swift_version"
5859 echo "version=$latest" >> "$GITHUB_OUTPUT"
59- if [[ -z "$(git status --porcelain .swift-version )" ]]; then
60+ if [[ -z "$(git status --porcelain "$swift_version" )" ]]; then
6061 echo "Already set to the latest Swift release, exiting."
6162 exit 0
6263 fi
6667
6768 > This PR was automatically generated."
6869
69- git add .swift-version
70+ git add "$swift_version"
7071 git commit -m "$title" -m "$body"
7172 git push -u origin "$branch"
7273
You can’t perform that action at this time.
0 commit comments