You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The publish_next build breaks when the commit hash has a leading zero and consists of only numbers. The script responsible for extracting the commit hash and adding it to the package version, treats the hash as a number which leads to the leading 0 being removed. See example build at https://github.com/pnp/cli-microsoft365/actions/runs/3606017259/jobs/6079529925
Steps to reproduce
Very hard, because you need to have a short commit hash consisting of only numbers
Expected results
npm package published with the exact short commit hash
Actual results
npm package published the with the short commit hash with the leading 0 stripped
Diagnostics
No response
CLI for Microsoft 365 version
Latest from main
nodejs version
v16
Operating system (environment)
Linux
Shell
bash
cli doctor
No response
Additional Info
It seems like the issue is caused by the npm publish command that removes the leading 0 from the package version. It seems like we're stamping the correct version in the update-package-version.js script, but when we then move to npm publish, what's published is the version without the leading 0.
A workaround could be to check if the short commit hash starts with a 0 and if so, if it's a number, and if it is, add an additional letter.
The text was updated successfully, but these errors were encountered:
Description
The publish_next build breaks when the commit hash has a leading zero and consists of only numbers. The script responsible for extracting the commit hash and adding it to the package version, treats the hash as a number which leads to the leading 0 being removed. See example build at https://github.com/pnp/cli-microsoft365/actions/runs/3606017259/jobs/6079529925
Steps to reproduce
Very hard, because you need to have a short commit hash consisting of only numbers
Expected results
npm package published with the exact short commit hash
Actual results
npm package published the with the short commit hash with the leading 0 stripped
Diagnostics
No response
CLI for Microsoft 365 version
Latest from main
nodejs version
v16
Operating system (environment)
Linux
Shell
bash
cli doctor
No response
Additional Info
It seems like the issue is caused by the
npm publish
command that removes the leading 0 from the package version. It seems like we're stamping the correct version in the update-package-version.js script, but when we then move tonpm publish
, what's published is the version without the leading 0.A workaround could be to check if the short commit hash starts with a 0 and if so, if it's a number, and if it is, add an additional letter.
The text was updated successfully, but these errors were encountered: