-
Notifications
You must be signed in to change notification settings - Fork 134
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
Enhancement: "--skip-existing" for running "flit publish" (e.g., within CI) #142
Comments
Thanks @cjrh ; I tend to think this will be more useful as an utility "Does this version already exist" which would allow to conditionally use flit. Now the hard part is to get the information about the version numbers and filename from flit, maybe a dry-run option ? With a --json to make it easy to parse ? You might also be able to just build with flit, and publish with twine; in which case you can already make use of all the flags present in twine. |
Yup, that's a clever idea: just deploy with twine. That will work fine for me. Feel free to close this. |
Leaving open, to do at least a documentation update/FAQ. If it's often requested we could also add the option, but let's get some data first :-) |
Another approach is to deploy only when the build is on a git tag (Travis makes this straightforward, not sure about Appveyor). I'll agree with @Carreau - it may make sense to add it, but as there's an easy workaround (using twine), there's no rush. Maybe |
And yet another option might be that flit simply uses twine as a library, maybe passes unknown (to flit) cmdline args onto But anyway, the "right thing" is probably to not do anything until enough users want it :) |
I would want such a feature inside a CI/CD secenario. Currently we solve that by using |
Apologies if this feature already exists. I didn't find it.
I'd like to run
flit publish
automatically at the end of a CI build. If the current version already exists on pypi, the publish command will produce an error, but if there was a--skip-existing
flag, then such errors could be suppressed. For example, for setuptools-based projects I use a basicappveyor.yml
template that looks something like this (the pypi deploy part is at the bottom):So basically:
--skip-existing
will only upload the build artifacts if they're new.The text was updated successfully, but these errors were encountered: