Skip to content

Commit

Permalink
Update Dockerfile.buildid
Browse files Browse the repository at this point in the history
  • Loading branch information
BattlefieldDuck committed Nov 10, 2024
1 parent 410234c commit e4a01b6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile.buildid
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e4a01b6

Please sign in to comment.