Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/workflows/automatic-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:

- name: Create update PR
id: cpr
if: steps.updt.outputs.result != ''
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
token: ${{ secrets.GH_API_TOKEN }}
Expand Down
9 changes: 7 additions & 2 deletions build-automation.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,15 @@ export default async function(github) {
console.log(stdout);
updatedVersions.push(newVersion.fullVersion);
} else {
console.log(`There's no musl build for version ${newVersion.fullVersion} yet.`);
process.exit(0);
console.log(`Skipping version ${newVersion.fullVersion} - no musl build available yet.`);
}
}

if (updatedVersions.length === 0) {
console.log("No versions with musl builds were updated.");
process.exit(0);
}

const { stdout } = (await exec(`git diff`));
console.log(stdout);

Expand Down
6 changes: 6 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ function update_node_version() {
else
if [ "${SKIP}" != true ]; then
sed -Ei -e 's/^(ENV YARN_VERSION)=.*/\1='"${yarnVersion}"'/' "${dockerfile}-tmp"
else
# Preserve existing YARN_VERSION from current Dockerfile when SKIP=true
existingYarnVersion=$(sed -n 's/^ENV YARN_VERSION=//p' "${dockerfile}")
if [ -n "${existingYarnVersion}" ]; then
sed -Ei -e 's/^(ENV YARN_VERSION)=.*/\1='"${existingYarnVersion}"'/' "${dockerfile}-tmp"
fi
Comment on lines +173 to +178
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.

Suggested change
else
# Preserve existing YARN_VERSION from current Dockerfile when SKIP=true
existingYarnVersion=$(sed -n 's/^ENV YARN_VERSION=//p' "${dockerfile}")
if [ -n "${existingYarnVersion}" ]; then
sed -Ei -e 's/^(ENV YARN_VERSION)=.*/\1='"${existingYarnVersion}"'/' "${dockerfile}-tmp"
fi

Remove to avoid rebase conflict, as this code section no longer exists

fi
echo "${dockerfile} updated!"
fi
Expand Down