Skip to content
Closed
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
6 changes: 3 additions & 3 deletions .github/workflows/release-rc-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
FILE_PATH="wren-launcher/utils/docker.go"

# Replace the WREN_PRODUCT_VERSION value with the new release version
sed -i "s/WREN_PRODUCT_VERSION\s*string = \"[^\"]*\"/WREN_PRODUCT_VERSION\tstring = \"${{ github.event.inputs.release_version }}\"/" $FILE_PATH
sed -i '' "s/WREN_PRODUCT_VERSION[[:space:]]*string = \"[^\"]*\"/WREN_PRODUCT_VERSION string = \"${{ github.event.inputs.release_version }}\"/" $FILE_PATH

Comment on lines 41 to 43
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

❓ Verification inconclusive

Potential Compatibility Issue in the sed Command.
The updated sed command now uses -i '', which is required for BSD sed (e.g., on macOS) but will likely fail on GNU sed used in an ubuntu-latest environment. Consider removing the empty-string argument (i.e. use -i without quotes) to ensure compatibility on Linux runners.

For example, you might apply this diff:

-          sed -i '' "s/WREN_PRODUCT_VERSION[[:space:]]*string = \"[^\"]*\"/WREN_PRODUCT_VERSION    string = \"${{ github.event.inputs.release_version }}\"/" $FILE_PATH
+          sed -i "s/WREN_PRODUCT_VERSION[[:space:]]*string = \"[^\"]*\"/WREN_PRODUCT_VERSION    string = \"${{ github.event.inputs.release_version }}\"/" $FILE_PATH

Compatibility Concern with the sed Command on GNU/Linux Runners
The current change (using -i '') is valid for BSD sed on macOS but will break on GNU sed (used on ubuntu-latest). Please modify the command to use -i without an empty-string argument to ensure compatibility.

  • File: .github/workflows/release-rc-pr.yaml
  • Lines: 41–43

Proposed Diff:

-          sed -i '' "s/WREN_PRODUCT_VERSION[[:space:]]*string = \"[^\"]*\"/WREN_PRODUCT_VERSION    string = \"${{ github.event.inputs.release_version }}\"/" $FILE_PATH
+          sed -i "s/WREN_PRODUCT_VERSION[[:space:]]*string = \"[^\"]*\"/WREN_PRODUCT_VERSION    string = \"${{ github.event.inputs.release_version }}\"/" $FILE_PATH
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Replace the WREN_PRODUCT_VERSION value with the new release version
sed -i "s/WREN_PRODUCT_VERSION\s*string = \"[^\"]*\"/WREN_PRODUCT_VERSION\tstring = \"${{ github.event.inputs.release_version }}\"/" $FILE_PATH
sed -i '' "s/WREN_PRODUCT_VERSION[[:space:]]*string = \"[^\"]*\"/WREN_PRODUCT_VERSION string = \"${{ github.event.inputs.release_version }}\"/" $FILE_PATH
# Replace the WREN_PRODUCT_VERSION value with the new release version
sed -i "s/WREN_PRODUCT_VERSION[[:space:]]*string = \"[^\"]*\"/WREN_PRODUCT_VERSION string = \"${{ github.event.inputs.release_version }}\"/" $FILE_PATH

# Verify the changes
grep "WREN_PRODUCT_VERSION" $FILE_PATH
Expand All @@ -60,18 +60,18 @@ jobs:

- name: Commit changes
run: |
git add wren-launcher/utils/docker.go docker/.env.example
git add .
git commit -m "release ${{ github.event.inputs.release_version }}"

- name: Push branch
run: |
git push --set-upstream origin ${{ env.BRANCH_NAME }}

- name: Create Pull Request
id: create-pr
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "release ${{ github.event.inputs.release_version }}"
branch: ${{ env.BRANCH_NAME }}
base: main
title: "Release ${{ github.event.inputs.release_version }}"
Expand Down