Comments (4)
We should also add the tag prefix <project>-latest
for independent versions to avoid conflicts.
from semver.
The more I think about this, the more I wonder if it's up to the builder to tag.
There is a real challenge with independent mode. If we use a different tag for each project then we won't be able to use nx affected
and we'll have to build our own mechanism to check which projects should be bumped.
If we use nx affected
then we can tag latest
but if we run version
manually then we shouldn't tag latest
.
I can see two different approaches:
- Let the CI handle the tagging. This is more flexible as users can run
version
thenngx-deploy-npm
then anything and finally taglatest
but it's less convenient and out of the box. nx run workspace:version
should runnx affected --target version --base latest
from semver.
One other approach would be to simply avoid the latest
tag with independent mode, it does not have a meaning to have one single tag for many packages at the same time.
Regarding the nx affected
command, we can simply replace the need of the latest tag using GitHub refs.
nx affected:build --base=origin/master --head=${{ github.event.pull_request.head.ref }}
or
nx affected:build --base=origin/master --head=${{ github.event.push.head.ref }}
Do we bring this feature for the synced mode at least? This discussion raise doubts about the whole thing.
from semver.
I think that we have to find a solution that solves the following issues:
1. The nx affected base
The problem with the origin/master
approach is failing builds.
Suppose one or more builds fail (e.g. libs a
, b
, c
should bump but as something goes wrong with a
, they don't), then we fix that in one commit that only affects one of them (e.g. lib a
) then some libs won't be bumped (e.g. b
& c
) while they should.
We need a latest
tag that marks the last time that we were able to bump & deploy all apps and libs... or any other generic solution but I can't think of anything easier and as robust as a tag.
2. Publishable packages
We have to publish all packages before tagging & pushing the latest
tag.
3. Deployable apps
We have to deploy apps before tagging & pushing the latest
tag.
As apps deployment is out of our scope, we have to separate the version
& tag-latest
steps.
I think that the CI workflow should look something like:
nx affected --base refs/tags/latest version
nx affected --base refs/tags/latest deploy
nx run workspace:tag-latest
... or maybe, we should forget about tags, make version
idempotent and run it on all projects:
nx run-many --all --target version
nx affected --base refs/tags/latest deploy
It feels wrong to run version
on all projects all the time instead of enjoying the benefits of nx affected
but at least we don't pollute git with additional tags. What do you think @edbzn? I'll rename the issue to be less influencing.
from semver.
Related Issues (20)
- Latest version(v5.1.1) not bumping the version of a project if the changes made to the dependency. HOT 3
- How to pass postTargets as cli args ? HOT 1
- Release version not correlated to previous Prerelease version HOT 4
- @jscutlery/semvver:github executor failing HOT 1
- `{projectName}` interpolation by Nx causes wrong dependencies versions in changelogs
- Possibility to write version info to some file
- Adding `releaseAs=preminor` && `preid=beta` doesn't work as expected HOT 1
- Changelogs are not correctly being generated with custom preset
- Atomic push not working as expected
- `runPostTargets` unexpectedly pass target options as overrideOptions
- release does not consider prerelease tags
- Add support for @nx/devkit v19.0.0 HOT 6
- `Release` does not consider `prerelease` tag
- `@jscutlery:version` executor failing with @nx v19.0.4 HOT 2
- How I can reset semver on existing repository?
- prerelease tags being set on the wrong commits HOT 2
- Error Finding Base Tag 'last-release' During GitHub Action Execution HOT 3
- GitHub CI output version HOT 1
- [Request] Add support for forwarding params to postTargets
- PostTarget attribute does not work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from semver.