feat: modify package.json for dev branch to append '-dev' to productName based on OS

This commit is contained in:
troyeguo
2025-11-30 14:46:49 +08:00
parent aacbbde9e1
commit 1fd28696a4

View File

@@ -51,6 +51,15 @@ jobs:
run: echo "USE_SYSTEM_FPM=true" >> $GITHUB_ENV
- name: Set environment variable USE_HARD_LINKS
run: echo "USE_HARD_LINKS=false" >> $GITHUB_ENV
- name: Modify package.json for dev branch
if: github.ref == 'refs/heads/dev'
shell: bash
run: |
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
powershell -Command "(Get-Content package.json) -replace '\"productName\": \"([^\"]+)\"', '\"productName\": \"`$1-dev\"' | Set-Content package.json"
else
sed -i.bak 's/"productName": "\([^"]*\)"/"productName": "\1-dev"/' package.json
fi
- name: Modify package.json for Linux arm64 build
if: startsWith(matrix.os, 'ubuntu-24.04-arm')
run: |