Skip to content
Merged
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
11 changes: 8 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,14 @@ jobs:

# Add the new version in package.json file
sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${{ steps.TAG_UTIL.outputs.extVersion }}\",#g" package.json
sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${{ steps.TAG_UTIL.outputs.extVersion }}\",#g" packages/api/package.json

Choose a reason for hiding this comment

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

suggestion(non-blocking): use a loop (given by gemini, untested):

PACKAGE_JSON_FILES="package.json packages/api/package.json packages/channels/package.json packages/extension/package.json packages/rpc/package.json packages/webview/package.json"
for file in ${PACKAGE_JSON_FILES};
do
     sed -i  "s#version":\ \"\(.*\)\",#version":\ \"${{ steps.TAG_UTIL.outputs.extVersion }}\",#g" $file
done
git add ${PACKAGE_JSON_FILES} build/Containerfile

(and similar for line 112)

Copy link
Contributor Author

@feloy feloy Dec 3, 2025

Choose a reason for hiding this comment

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

ok, I'll do this in a follow-up PR, when the tests/playwright module is included, to find the package.json files dynamically

sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${{ steps.TAG_UTIL.outputs.extVersion }}\",#g" packages/channels/package.json
sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${{ steps.TAG_UTIL.outputs.extVersion }}\",#g" packages/extension/package.json
sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${{ steps.TAG_UTIL.outputs.extVersion }}\",#g" packages/rpc/package.json
sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${{ steps.TAG_UTIL.outputs.extVersion }}\",#g" packages/webview/package.json
sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${{ steps.TAG_UTIL.outputs.extVersion }}\",#g" packages/api/package.json
sed -i "s#\(ghcr.io/podman-desktop/podman-desktop-extension-kubernetes-dashboard-builder:\)next#\1${{ steps.TAG_UTIL.outputs.extVersion }}#g" build/Containerfile

git add package.json packages/extension/package.json packages/webview/package.json build/Containerfile
git add package.json packages/api/package.json packages/channels/package.json packages/extension/package.json packages/rpc/package.json packages/webview/package.json build/Containerfile

# commit the changes
git commit -m "chore: 🥁 tagging ${{ steps.TAG_UTIL.outputs.githubTag }} 🥳"
Expand Down Expand Up @@ -100,11 +102,14 @@ jobs:
bumpedBranchName="bump-to-${bumpedVersion}"
git checkout -b "${bumpedBranchName}"
sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${bumpedVersion}-next\",#g" package.json
sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${bumpedVersion}-next\",#g" packages/api/package.json
sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${bumpedVersion}-next\",#g" packages/channels/package.json
sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${bumpedVersion}-next\",#g" packages/extension/package.json
sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${bumpedVersion}-next\",#g" packages/rpc/package.json
sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${bumpedVersion}-next\",#g" packages/webview/package.json
# put back next as the version in the Containerfile
sed -i "s|\(ghcr.io/podman-desktop/podman-desktop-extension-kubernetes-dashboard-builder:\)[^ ]*|\1next|" build/Containerfile
git add package.json packages/extension/package.json packages/webview/package.json build/Containerfile
git add package.json packages/api/package.json packages/channels/package.json packages/extension/package.json packages/rpc/package.json packages/webview/package.json build/Containerfile

git commit -s --amend -m "chore: bump version to ${bumpedVersion}"
git push origin "${bumpedBranchName}"
Expand Down