Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semantic Release is not updating the master branch version #32

Closed
ashblue opened this issue Oct 17, 2020 · 15 comments
Closed

Semantic Release is not updating the master branch version #32

ashblue opened this issue Oct 17, 2020 · 15 comments
Labels
bug Something isn't working investigating Need more information before determining action

Comments

@ashblue
Copy link
Owner

ashblue commented Oct 17, 2020

Releases are not updating the root package.json version. Investigate why. Open a ticket with Oyster or the package assembler if the issue is in the corresponding package.

@ashblue ashblue added bug Something isn't working investigating Need more information before determining action labels Oct 17, 2020
@favoyang
Copy link

I guess the reason could be you're running the npm plugin against the generated dist/ folder. The original package.json is not get updated. So you need to tweak the ordering, by updating package.json at the right place first, then run the build script. You also need to commit the changed package.json via Git plugin.

Here's a working .releaserc:
https://github.com/favoyang/unity-addressable-importer/blob/master/.releaserc.json (json format, but simliar)

@favoyang
Copy link

Please try install semantic-release and run it with --dryrun to verify your modification https://semantic-release.gitbook.io/semantic-release/usage/configuration#dryrun

@ashblue
Copy link
Owner Author

ashblue commented Oct 18, 2020

Well it's working in some of my other repos so I'll have to do a little digging. Yeah, it could quite possibly be the ordering in the release file.

@ashblue
Copy link
Owner Author

ashblue commented Mar 24, 2021

Finally had some time to dig into this. The issue is directly tied to Oyster Package Manager. It seems a version change on the Git semver plugin requires specifying the package.json to check it in. Need to do some more digging there.

https://github.com/ashblue/oyster-package-generator

@favoyang
Copy link

You need to specify the assets parameter of @semantic-release/git (in .releaserc.json) if the package is not located at the root path.

https://github.com/semantic-release/git

And if the CHANGELOG is not located at the root path, you need to specify the changelogFile path of @semantic-release/changelog as well.

https://github.com/semantic-release/changelog

@ashblue
Copy link
Owner Author

ashblue commented Mar 29, 2021

I found the issue and it has to do with the NPM plugin running after the Git plugin for Semantic Release. I'm also having to rewrite the build compiler to hard write version values to master before deploy. Going to take me some time to get the CLI tool stable to do this via Oyster (WIP).

@favoyang
Copy link

Nice catch.

@ashblue
Copy link
Owner Author

ashblue commented Jun 2, 2021

This issue should now be resolved as of #59

@ashblue ashblue closed this as completed Jun 2, 2021
@favoyang
Copy link

favoyang commented Jun 5, 2021

This issue should now be resolved as of #59

@ashblue thanks for the update. So everything should be settled down once this been merged into the master branch?

@favoyang
Copy link

favoyang commented Jun 5, 2021

And am I right that you will not change the package name of these package.json files to make it different?

@ashblue
Copy link
Owner Author

ashblue commented Jun 6, 2021

The underlying package manager Oyster relies on the root package.json for a lot of operations. As the package manager itself is written in Node.js (same package tech Unity opted into). Multiple package.json files aren't unusual in Node.js projects. It could be renamed or removed into a separate branch, but it would be a lot of work to do so. If there was some sort of underlying config file to specify the pacakge.json I could easily fix this. It would have to be that or a pull request on Oyster to create a separate branch at the right time in the template files. Not against the idea at all, just don't have time to write the feature atm (pandemic was not kind to me the past year).

@favoyang
Copy link

favoyang commented Jun 6, 2021

https://github.com/ashblue/fluid-behavior-tree/blob/develop/Assets/com.fluid.behavior-tree/package.json is the actually upm package meta file, so that file is all I care about. I'm just wondering after #59 gets merged into the master branch (from the develop branch), will that file get version synced (x.y.z instead of 0.0.0)? If so, I may have a way to resolve the duplicate package.json issue on the OpenUPM side, by introducing a "package meta file search path".

@ashblue
Copy link
Owner Author

ashblue commented Jun 7, 2021

Once a new release triggers it should start auto-updating the package.json versions automatically in master. Fluid Stats is doing this already and everything seems to be working fine https://github.com/ashblue/fluid-stats/blob/master/Assets/com.fluid.stats/package.json. I've updated this repo to Oyster v2 already in develop. Releases won't trigger unless a new feature or bugfix is detected.

@favoyang
Copy link

Okay. I will watch for the next release to verify it.

@ashblue
Copy link
Owner Author

ashblue commented Jun 13, 2021

Thx for your patience on this. Took up a lot more time than expected to create a migration tool to get my old repos from Oyster v1 to v2 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working investigating Need more information before determining action
Projects
None yet
Development

No branches or pull requests

2 participants