Description
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Build process
- Unit testing
- Internationalization
- Friendly errors
- Other (specify if possible)
p5.js version
1.11.4 and 2.0
Web browser and version
Microsoft Edge, Version 135.0.3179.66 (Official build) (64-bit)
Operating system
Windows 11
Steps to reproduce this
Steps:
- Bump the version of p5.js to 1.11.4(example).
- After the release process is finished, check p5.js-website repo.
- Found a change commit contains contribute docs, which exactly changes to older version 1.11.3 docs.
Root cause:
I noticed this issue when I checked the p5.js-website repo and found the recent change by me got removed by the github-actions[bot]. The issue is because of release-workflow.yml. the sequence of build contains:
cd website
npm install
npm run build:contributor-docs
...
npm run build:p5-version
There are two important commands here, from the package.json file of the p5.js-website, we can see those details:
"build:contributor-docs": "tsx ./src/scripts/builders/contribute.ts",
...
"build:p5-version": "tsx ./src/scripts/p5-version.ts",
And we check the those two files and found in the contribute.ts:
let latestRelease = p5Version;
if (/^\d+\.\d+\.\d+$/.exec(latestRelease)) {
latestRelease = 'v' + latestRelease;
}
await cloneLibraryRepo(clonedRepoPath, docsRepoUrl, latestRelease);
It will clone the p5.js repo with the p5Version
tag. But we found in the p5-version.ts file, it will update the version number. So, the sequence will be: 1. clone the p5.js repo with old version (1.11.3) and use the docs inside it to update the p5.js website 2. then update the version (1.11.4) in p5.js-website repo.
This issue is also found in the release workflow file for release-workflow-v2.yml, and dev-2.0 branch(1) and dev-2.0 branch(2).
Potential Fix:
In the workflow file, move the npm run build:p5-version
to the beginning of all npm run
command. As a result, the bot will update the p5.js version first, and clone the p5.js repo with the new version and then use those docs to update p5.js website.
@limzykenneth (as you are the steward of Build Process) and @ksen0 (as you submitted the recent bump version change), could you please take a look at this issue? If you think my fix proposal is correct, please assign it to me! Thanks a lot!