-
Notifications
You must be signed in to change notification settings - Fork 68
Add a option to include files when tag #55
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
Comments
What "keep in Tag" means? What |
Sorry I didn't describe it very clearly. In manual, below steps can achieve what I want:
So in simply, I want ignore some files, but can include in Tag. At first I thought option assets can do what I want, until I saw the document. Can this done by semantic-release/git automatically? Or it doesn't make sense... Thanks for you help! |
We can't include files in a Tag, as a tag is only a reference to a commit. The files would be added to the commit (which in turn is referenced by the tag). Currently we use the command I guess we can use Would that work for you? |
Not 100% but almost there.
Sorry I think again, you are right, user adding files in Thanks! |
I'm not convinced about adding yet another option. In which case one would set that option to |
Yes, sorry I just lost my brain 😆 |
🎉 This issue has been resolved in version 6.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Just saw this, and I think your assumption here is faulty. As an example, here is the relevant line of my config: {
"path": "@semantic-release/git",
"assets": ["**"]
} I want to include in the commit everything that's changed EXCEPT for what's in the Not sure the best way to resolve this. NPM does it by having an |
I understand your point, however I don't think we want to encourage the practice of configuring
You should configure your project and build steps to clearly separate what is a build output from the source code. The case of npm is different though because the deliverable can be and often are the same thing. In the case of this plugin, the source code is never considered being part of the release as it is already checked in the repo. |
Your point is well taken, but part of my build step is to run code cleanup, eg. eslint. If the clean up fails then the build should fail, but if it is able to autofix any issues then there's no reason not to pass the build. If it passes the build and fixed code formatting issues, it should commit those changes along with the updates to the change log. |
Also, I think the fact that |
Linting and fixing code shouldn't be part of a release process. That should be part of the development process. All the code that reach You should configure your CI/Linter to run on PRs and report errors there, so you can fix the linting errors before merging the faulty code into Long story short, the workflow you are describing is something we would consider a bad practice that goes against the type of workflow semantic-release try to support. So we won't implement a change to make it easier to support such workflow. Regarding your second comment, supporting globs doesn't goes against specificity. You can still configure a glob and be specific (glob does not only means In such case you would have a |
I wasn't suggesting that you would want to add 100s of entries individually, but rather if you are adding 100s of entries using globs, you will inevitably need a way to exclude files that would otherwise be included. With git the normal way of doing that is |
As mentioned in the documentation you can use negative globs to exclude some files:
A Git repository is primarily meant to store source code and the This is why npm offers |
I'll take your word for it that this is an "abuse" of git, but I guess we're just back to my original comment. "Abuse" or not we are using git, and I've already told git what I want to ignore. While negative globs work, they require that I repeat configuration. Anyway that's my two cents on the matter, overall semantic-release is pretty awesome. |
Some times I have files that only want keep in Tag.
Like
dist
folder, I don't want track in any branch, so I add/dist
to.gitignore
But I want
dist
keep in Tags to release.By assets document described, add
dist
to assets is no help.So, can add a option to include files only when doing tag?
Or have some way to achieve?
Thank you!
The text was updated successfully, but these errors were encountered: