-
Notifications
You must be signed in to change notification settings - Fork 246
Description
Description of the issue
The script that manages the build and publish of a new version of the prototype kit (./scripts/prepare-release, which itself calls ./scripts/utils/create-release-pr where the root of this issue is) breaks at the point we want to publish to npm and github. Specifically it gets caught in an infinite loop of trying to run clean-publish from an environment that doesn't have access to that command.
Steps to reproduce the issue
- Run
./scripts/prepare-releasewhich will build a new release and raise a PR - Approve that PR. This will trigger the script to move on to asking the script runner to login to npm
- Run
npm loginand follow the login flow to gain local access, which will progress the script to attempting to automatically publish
At this point the script will attempt to run npm run clean-publish from the environment govuk-prototype-kit@[release number being released] which at that point doesn't exist. This leads to the following being output on a loop until the script runner kills the process.
> [email protected] clean-publish
> clean-publish --before-script scripts/clean-publish-before-script.sh
sh: clean-publish: command not found
Something went wrong, trying again.
If you don't want to try again exit this process. If you want to run the rest of the release manually run:
git checkout main && git fetch && git reset --hard origin/main && npm run clean-publish
Notes
We previously attempted to improve this part of the script with #2460 to resolve a different issue with the publishing portion of the script but it's unfortunately either spawned a new problem or underlined one that was always there.
This issue could be superceded by converting the release script into github actions workflows like in govuk-frontend.