-
-
Notifications
You must be signed in to change notification settings - Fork 7
Updates to steam release script #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant S as Build Script
participant SCM as SteamCMD / VDF Generator
U->>S: Execute build_steam_release.sh
S->>S: Set environment variables (CMD, UNAME, GIT_BRANCH, GIT_TAG, GIT_COMMIT)
S->>S: Validate and safely quote STEAM_USR & STEAM_PWD
S->>SCM: Invoke steamcmd with metadata & credentials
SCM-->>S: Return build results
S-->>U: Output build status & metadata details
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
scripts/build_steam_release.sh (1)
81-86: Addition of Build Metadata VariablesIntroducing metadata variables (
CMD,UNAME,GIT_BRANCH,GIT_TAG, andGIT_COMMIT) adds valuable context to the build process. This enhancement makes the build description inapp_build.vdfmore informative.
Consider adding error handling or fallback defaults in case any of the Git commands fail (for example, in environments where the repository context is not available).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
scripts/build_steam_release.sh(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (11)
- GitHub Check: build (ubuntu-latest, Debug, mingw-w64-gcc)
- GitHub Check: build (macos-latest, Debug, gcc)
- GitHub Check: build (ubuntu-latest, Debug, clang)
- GitHub Check: build (macos-latest, Debug, clang)
- GitHub Check: build (macos-latest, Release, clang)
- GitHub Check: build (ubuntu-latest, Release, gcc)
- GitHub Check: build (ubuntu-latest, Release, clang)
- GitHub Check: build (macos-latest, Release, gcc)
- GitHub Check: build (ubuntu-latest, Debug, gcc)
- GitHub Check: build (ubuntu-latest, Release, mingw-w64-gcc)
- GitHub Check: Analyze (c-cpp)
🔇 Additional comments (5)
scripts/build_steam_release.sh (5)
10-13: Proper Quoting for Environment Variable STEAM_USRWrapping the variable expansion in double quotes ensures that any spaces or special characters in
$STEAM_USRare handled correctly, preventing word splitting or globbing issues.
15-18: Proper Quoting for Environment Variable STEAM_PWDThe
$STEAM_PWDvariable is now enclosed in double quotes during the check. This practice guards against unexpected behavior if the password contains spaces or special characters.
20-35: Robust Command Availability ChecksThe series of checks using
command -vforsteamcmd,unzip,cmake, andcpackare well implemented. Redirecting output to/dev/nullavoids noise and ensures that the script halts with a clear error message if any of these commands are missing.
87-92: Dynamic Build Description UpdateUpdating the
"Desc"field in theapp_build.vdffile to incorporate the newly defined metadata variables is a solid improvement. This dynamic description helps track the build’s context more accurately.
124-126: Secure SteamCMD Login and Build Command InvocationUsing double quotes around
$STEAM_USRand$STEAM_PWDin thesteamcmdcall is a crucial update that ensures credentials are processed correctly even if they contain spaces or special characters. Likewise, dynamically constructing the path for the app build file with$(pwd)/$STEAM_BUILD_DIR/app_build.vdfcontributes to the script’s robustness.
Summary by CodeRabbit