From e4a01b6b6612ad06f3b9527c2c5cf7144ce9a46b Mon Sep 17 00:00:00 2001 From: TatLead Date: Sun, 10 Nov 2024 17:47:57 +0800 Subject: [PATCH] Update Dockerfile.buildid --- Dockerfile.buildid | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile.buildid b/Dockerfile.buildid index 2733fcd..93b5d8b 100644 --- a/Dockerfile.buildid +++ b/Dockerfile.buildid @@ -6,10 +6,12 @@ ARG APP_ID # Run steamcmd to log in anonymously, update app info, and print app info # Output is redirected to output.txt +RUN steamcmd +login anonymous +app_info_update 1 +app_info_print ${APP_ID} +quit > output.txt \ + && cat output.txt + # Use grep to extract the buildid from the output and save it to buildid.txt # If buildid.txt is empty, print an error message and exit with a non-zero status to fail the build -RUN steamcmd +login anonymous +app_info_update 1 +app_info_print ${APP_ID} +quit > output.txt \ - && grep -zoP '"public"\s*{\s*"buildid"\s*"\K\d+(?=")' output.txt > buildid.txt \ +RUN grep -zoP '"public"\s*{\s*"buildid"\s*"\K\d+(?=")' output.txt > buildid.txt \ && if [ ! -s buildid.txt ]; then echo "buildid.txt is empty" && exit 1; fi # Print the remote buildid