Search posts, tags, users, and pages
Thank you Jonathan Adcox Just for me out of interest. Does your comment only refer to the Gulp commands (from the article) or also to the CLI (which I mentioned in the comments)? BTW: If you're interested, I also have an article on how you can integrate the same logic into an Azure DevOps pipeline to increment the version, create the package and create another Git tag with the same version number
$€®¥09@ to the Gulp command in the article. However there were a few bugs. When I build and clean it will not run as intended and only when I use the gulp command directly does it build properly and it builds with Major version only. Did you address this in the comments?
Jonathan Adcox Hmmm, where exactly is the error? I've never had this before. I use npm run publish and this command does a gulp clean and then a gulp build, gulp bundle --ship, gulp bump-version and then gulp package-solution --ship one after the other.
Normally only the patch version is updated, unless you specify something else.
By the way: If you use the command npm run publish and there was a warning/error in the console output, then the commands are not executed, with the output exit with code 1 (or something like that). This is due to the && command combination. But you can prevent this by disabling the warnings.
PS: As mentioned in the other comments, I can recommend using my CLI, which does exactly the same settings as described in this article, and does so with a command line and also adds the "disable warnings" command. And some more. Here is the link to the CLI article (with Video): spfx-app.dev/my-cli-for-spfx-development
$€®¥09@ oh I already disabled those errors due to an unused variable that is only accessed in SharePoint however in the build it is never used. As such I had to disable the warning to build the solution. I likely fat fingered something. I will go back and see what I transposed wrong