Comments (11)
Just to clarify, I meant addition of this --force
flag here: semantic-release/semantic-release@master...beocommedia:force-local-tag-updates.
Not sure if doing so makes sense for everyone. For now, I am just running these on CI before invoking npx semantic-release ...
and right before publishing to GitLab. This is not perfect, but minimizes chances of flux repo updates interfering with the semantic-release
updates.
git fetch -tp -f --all
git tag -d flux-sync-stg || true
git tag -d flux-sync-prod || true
from git.
You shouldn't modify the commits release tags points to. That would completely mess up what semantic-release is doing. semantic-releases uses those tags to figure out what are the new commits since the last release, so if you change those the releases won't happens as intended.
In addition this error is due to the fact that you have a discrepancy between the tags on the remote and the local repo. semantic-release should run on your CI on a freshly cloned repo in which case you shouldn't have discrepancy between the remote and the clone.
I don't know what is your current workflow, but it seems to be something we can't support.
Even if we were to add -f
to git fetch --tags
that would only remove this error message but wouldn't solve the core issue: you should never change release tags, and your local repo clone should be identical to the remote.
from git.
Hello community, I just found myself with this problem too, but I just solved it.
Surely when running the "react-native upgrade" command, it gave them the message that it was not necessary to update or with the command "react-native eject" that the command is not recognized.
Now you should use the "react-native upgrade --legacy true" command to back up your android folders or ios as the case may be as this command will replace your files.
Now it's just telling you not to replace your package.json
Greetings.
from git.
Can you provide more details. How do you end up in that situation.
Please provide steps to reproduce.
from git.
Flux is a K8s GitOps tool.
It updates the tag to point to the latest release.
So basically just updating a tag to point to a new HEAD is the repro.
from git.
I still have no idea how this related to semantic-release not how to reproduce.
I can't help you if on't provide more details and reproduction steps.
from git.
Hi Pierre,
Unfortunately, I cannot create a test environment by hand to reproduce this.
But essentially, what happened is the following.
A third party service force-updates an existing tag, which now points to a different commit than before. This tag was already published.
When semantic-release/git
fetches the tags from remote without the -f
flag, the error is thrown and the fetch fails.
A way to reproduce would be:
- Make a successful release
- Add a new tag
git tag foo
- Create another release later
- Update a tag
git tag -f foo
<-- now points to a different ref - Try to release and it will fail
from git.
I am not modifying the semantic release tags though. My example has a foo
tag. Real world example was a flux-sync
tag.
from git.
Still the problem is you have a discrepancy between your remote and your local repo.
How does that happened?
How do you clone your local repo on the CI?
from git.
Closing as no answer provided
from git.
I am having the same issue as @moltar. Once flux updates the remote tag flux-sync-prod
after the repo has been already cloned by CI, the semantic-release command git fetch --tags [repositoryUrl]
fails to update it with this message (see below). Perhaps the git command is missing the --force
flag?
[8:17:54 PM] [semantic-release] › ✖ An error occurred while running semantic-release: { Error: Command failed: git fetch --tags https://gitlab-ci-token:[secure]@[repositoryUrl]
From https://git.[redacted]:
* branch HEAD -> FETCH_HEAD
! [rejected] flux-sync-prod -> flux-sync-prod (would clobber existing tag)
from git.
Related Issues (20)
- Unable to exclude subdirectories from assets
- @semantic-release/git not able to commit CHANGELOG.md
- Unable to create Release on Azure Devops
- `assets` does not support files from parent directories HOT 3
- Allow the option to leverage --force in git push HOT 4
- [feature request] : push tag on publish phase HOT 5
- Allow pushing to another branch / manually pushing HOT 2
- How to set commit author? HOT 1
- Does semantic release support SSH git access (our IT has disabled HTTPS git access) HOT 1
- branch variable does not match documentation
- GPG Signatures Configuration HOT 8
- change the default user for publishing the tags HOT 1
- Pushing to another repository than the current?
- Semantic release tool is creating "git notes" is there documentation on why is that, and a way to disable this? HOT 2
- SeeManGITticks
- update documentation to more clearly discourage use of this plugin HOT 3
- Semantic Release Not Handling Package.json Or Files One Level Up Correctly HOT 1
- ES Module? HOT 2
- Update GPG documentation HOT 3
- Suggestion - Documentation & new option around commit hook HOT 1
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 git.