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

feat: add a keep_version flag #283

Closed
wants to merge 6 commits into from

Conversation

wellenvogel
Copy link

I'm using nfpm for some of my projects. As I already started other projects that also produce packages with a slightly different versioning schema (using other tools) I would like to have a chance to keep my version completely unchanged from the config to the created package.
To be fully compatible I introduced a flag to switch off the semver handling.

As I encountered problems when afterwards building a docker image I added a staticbuild task to the Makefile.

Working image at https://hub.docker.com/repository/docker/wellenvogel/nfpm: wellenvogel/nfpm:1.0

@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 16, 2021
@vercel
Copy link

vercel bot commented Jan 16, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/goreleaser/nfpm/H9Y8y9ttWN79rpwaa6kB3vyqErzM
✅ Preview: https://nfpm-git-fork-wellenvogel-master-goreleaser.vercel.app

@vercel vercel bot temporarily deployed to Preview January 16, 2021 16:00 Inactive
Copy link
Contributor

@djgilcrease djgilcrease left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good after a rebase

@caarlos0
Copy link
Member

hey, thanks for the pr and sorry for the delay to review, lost it in the notifications I think...


I would say to do something more like:

version_schema: semver (default)|none

so its hopefully clearer.

wdyt?


also need to mention the new option in the docs...

@djgilcrease
Copy link
Contributor

version_schema: semver (default)|none

I like this, then I would change the check to a switch to make it easier to add additional version schema in the future.

        switch info.VersionSchema {
            case "none":
                // No change to the version or prerelease info set in the YAML file
                break
            case "semver":
                fallthrough
            default:
                info.parseSemver()
        }

@caarlos0
Copy link
Member

I like this, then I would change the check to a switch to make it easier to add additional version schema in the future.

yep :)

@wellenvogel
Copy link
Author

For me it also looks good.
Any solution that allows to set a plain version is completely ok.

change the system to allow multiple version schema parsing systems, currently only `semver` and `none`
@vercel vercel bot temporarily deployed to Preview April 22, 2021 19:35 Inactive
@vercel vercel bot temporarily deployed to Preview April 22, 2021 19:39 Inactive
@vercel vercel bot temporarily deployed to Preview April 22, 2021 19:41 Inactive
@vercel vercel bot temporarily deployed to Preview April 22, 2021 19:43 Inactive
@codecov
Copy link

codecov bot commented Apr 22, 2021

Codecov Report

Merging #283 (12a0752) into master (1fb2691) will decrease coverage by 0.18%.
The diff coverage is 72.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #283      +/-   ##
==========================================
- Coverage   69.37%   69.18%   -0.19%     
==========================================
  Files           9        9              
  Lines        1159     1178      +19     
==========================================
+ Hits          804      815      +11     
- Misses        223      229       +6     
- Partials      132      134       +2     
Impacted Files Coverage Δ
rpm/rpm.go 73.20% <60.00%> (-0.67%) ⬇️
nfpm.go 82.75% <69.23%> (-2.57%) ⬇️
apk/apk.go 70.29% <100.00%> (+0.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 39f5bf3...12a0752. Read the comment docs.

@djgilcrease
Copy link
Contributor

Superceeded by #324

djgilcrease pushed a commit that referenced this pull request Apr 23, 2021
djgilcrease pushed a commit that referenced this pull request Apr 23, 2021
kodiakhq bot pushed a commit that referenced this pull request Apr 23, 2021
@github-actions
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants