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 versioning does not update open-balena-ui version in package.json #34

Open
fhuebner opened this issue Feb 20, 2025 · 3 comments

Comments

@fhuebner
Copy link
Contributor

When building the docker container, webpack uses the version set in package.json as version of open-balena-ui.

Building a production image (with docker build . ) will result the following output when starting the docker container:

docker run --rm --env-file=.env -p 3000:3000 --name=open-balena-ui open-balena-ui

> [email protected] serve
> node server

Running open-balena-ui on http://0.0.0.0:3000

checked out was a branch on top of 0.2.0 with some changes.

@shaunco
Copy link
Contributor

shaunco commented Feb 20, 2025

After action-vtl runs, subsequent steps can access the output via ${{ steps.vtl.outputs.XXXXXXXXXX }} where XXXXXXXXX that you're looking for is likely one of highlighted ones here:

Image

but I'm not clear if you're looking to update this in package.json only prior to the docker build or if you also want the updated package.json pushed back to github. If the former, pretty easy to use awk/sed in a in a job step just before the docker-build. If the latter, we'll need to figure out how to commit package.json back to the repo without triggering another action run, otherwise we'll get an infinite loop of builds/commits.

@fhuebner
Copy link
Contributor Author

I think we should be consistent with the versioning. If it is labeled with 0.3.0 as tag, the package.json should also have that version in it. And also the corresponding docker image. So yes, I would prefer to also update the package.json file in the repo with ever version update not just the tag.

If you generate a commit with [skip CI] or others in the title, the workflow run will be skipped see: https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/skipping-workflow-runs
(see the configuration settings for semantic-release in our repo: https://github.com/unipoin/open-balena-ui/blob/main/package.json#L104C3-L134C4 as example)

@shaunco
Copy link
Contributor

shaunco commented Feb 21, 2025

I'll push a PR today with this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants