Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .yamato/Publish To Stevedore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ dependencies:
- .yamato/Collate Builds.yml

commands:
- curl -sSo StevedoreUpload.exe "$STEVEDORE_UPLOAD_TOOL_URL"
- mono StevedoreUpload.exe --repo=unity-internal --version-len=8 --version="$GIT_REVISION" stevedore/MonoBleedingEdge.7z
- curl -sSo StevedoreUpload "$STEVEDORE_UPLOAD_TOOL_LINUX_X64_URL"
- chmod +x StevedoreUpload
- mv collectedbuilds/builds.tar.zst collectedbuilds/MonoBleedingEdge.tar.zst
- .yamato/scripts/generate_artifactid.sh collectedbuilds/MonoBleedingEdge.tar.zst
- ./StevedoreUpload --repo=unity-internal --version-len=8 --version="$GIT_REVISION" collectedbuilds/MonoBleedingEdge.tar.zst
Comment on lines +12 to +16
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could do all this in a compound block without the need for the generate_artifactid.sh script, eg:

Suggested change
- curl -sSo StevedoreUpload "$STEVEDORE_UPLOAD_TOOL_LINUX_X64_URL"
- chmod +x StevedoreUpload
- mv collectedbuilds/builds.tar.zst collectedbuilds/MonoBleedingEdge.tar.zst
- .yamato/scripts/generate_artifactid.sh collectedbuilds/MonoBleedingEdge.tar.zst
- ./StevedoreUpload --repo=unity-internal --version-len=8 --version="$GIT_REVISION" collectedbuilds/MonoBleedingEdge.tar.zst
- |-
set -euxo pipefail
curl -sSo StevedoreUpload "$STEVEDORE_UPLOAD_TOOL_LINUX_X64_URL"
chmod +x StevedoreUpload
mv collectedbuilds/builds.tar.zst collectedbuilds/MonoBleedingEdge.tar.zst
revision=$(git rev-parse --short HEAD)
artifactsha=$(sha256sum $1 | cut -d " " -f1)
echo "MonoBleedingEdge/${revision}_${artifactsha}.tar.zst\n" > collectedbuilds/artifactid.txt
./StevedoreUpload --repo=unity-internal --version="$revision" collectedbuilds/MonoBleedingEdge.tar.zst

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know about compound blocks! That's pretty neat. I still think I like having the logic off in a script to keep the yamato file less busy and a bit easier to read.


artifacts:
stevedore:
paths:
- stevedore/artifactid.txt
- collectedbuilds/artifactid.txt

2 changes: 1 addition & 1 deletion .yamato/Update Il2cpp-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ commands:
git checkout main
cd %UNITY_SOURCE_PRTOOLS_DIR%
git config --global core.longpaths true
cmd /v /c dotnet run --project C:\build\output\prtools\PRTools\PRTools.csproj --update-mono-il2cpp-deps=%YAMATO_SOURCE_DIR%/stevedore/artifactid.txt --github-api-token=%GITHUB_TOKEN% --yamato-api-token=%YAMATO_TOKEN% --yamato-long-lived-token --il2cpp-deps-manifest-file=il2cpp-deps.stevedore --yamato-owner-email=%YAMATO_OWNER_EMAIL%
cmd /v /c dotnet run --project C:\build\output\prtools\PRTools\PRTools.csproj --update-mono-il2cpp-deps=%YAMATO_SOURCE_DIR%/collectedbuilds/artifactid.txt --github-api-token=%IL2CPP_GITHUB_TOKEN% --yamato-api-token=%YAMATO_TOKEN% --yamato-long-lived-token --il2cpp-deps-manifest-file=il2cpp-deps.stevedore --yamato-owner-email=%YAMATO_OWNER_EMAIL%
if NOT %errorlevel% == 0 (
echo "PRTools failed"
EXIT /B %errorlevel%
Expand Down
10 changes: 10 additions & 0 deletions .yamato/scripts/generate_artifactid.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -euxo pipefail

revision=$(git rev-parse --short HEAD)
artifactsha=$(sha256sum $1 | cut -d " " -f1)

mkdir -p collectedbuilds

printf "MonoBleedingEdge/%s_%s.tar.zst\n" $revision $artifactsha > collectedbuilds/artifactid.txt