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

Remove 'v' prefix from version #59

Closed
silverwind opened this issue Apr 9, 2019 · 9 comments
Closed

Remove 'v' prefix from version #59

silverwind opened this issue Apr 9, 2019 · 9 comments

Comments

@silverwind
Copy link
Member

Currently this repo is set up to have v added to the tag (and tag message). Now I don't want to force my style on anyone, but I prefer tags to not include the 'v', so I'd like to change it, even if it's inconsistent with old tags. Anyone with me?

"patch": "npx ver -p patch wikipedia-dark.user.css",
"minor": "npx ver -p minor wikipedia-dark.user.css",
"major": "npx ver -p major wikipedia-dark.user.css",

silverwind referenced this issue in StylishThemes/GitHub-Dark-Script Apr 9, 2019
@silverwind
Copy link
Member Author

This question it for all StylishThemes repos, either we consistently add v or not. GHD has been ommitting the 'v' since a while now, by the way.

@silverwind
Copy link
Member Author

silverwind commented Apr 9, 2019

Maybe it is possible to unify past tags to the 'v'-less format with some git filter-branch magic, thought it would probably mean that GPG signatures on tags are lost and rewritten in process (not much of an issue).

Edit: yes, filter-branch can do it:

       --tag-name-filter <command>
           This is the filter for rewriting tag names. When passed, it will be
           called for every tag ref that points to a rewritten object (or to a
           tag object which points to a rewritten object). The original tag
           name is passed via standard input, and the new tag name is expected
           on standard output.

@Mottie
Copy link
Member

Mottie commented Apr 9, 2019

I don't think we need to worry about past tags.

@silverwind
Copy link
Member Author

Really not sure what the best scheme for tags is. Semver has been preaching a 'v' prefix in 1.0, but that requirement was dropped in 2.0. Generally, the majority of projects on GitHub seems to use the 'v' and it's also the default behaviour of npm version. On the other hand v1.2.3 is not a valid semantic version.

@the-j0k3r
Copy link
Member

This question it for all StylishThemes repos, either we consistently add v or not. GHD has been ommitting the 'v' since a while now, by the way.

Its been omitting the v due to ver -p prefix being broken until ver 4.1.0, no other reason afaik.

The only issue is that the tag badges dont seem to work without the v prefix, like https://github.com/StylishThemes/GitHub-Dark-Script/blob/master/README.md which tag badge is now broken also due to purpuseful removal of the v prefix.

I mean its nice to see the latest version without having to dig too much, Then again not all repos have that tag badge, which could do, what would be nice not to have tag badges that require a v prefix to work.

Maybe it is possible to unify past tags to the 'v'-less format with some git filter-branch magic, thought it would probably mean that GPG signatures on tags are lost and rewritten in process (not much of an issue).

Tag auto GPG signature is quite recent, so Ide not consider this a blocker for one or two signatures sake.

Whatever you guys decide really, but I'de prefer a solution that doesnt break tag badges.

@the-j0k3r
Copy link
Member

the-j0k3r commented Apr 10, 2019

Generally, the majority of projects on GitHub seems to use the 'v' and it's also the default behaviour of npm version. On the other hand v1.2.3 is not a valid semantic version.

v1.2.3 is a tag name according to semantic versioning 1.2.3 is the semantic version, considering only tags are prefixed with this, I wonder if its initially related to tab badges in some way?

Related badges/shields#3144 and badges/shields#3080

@silverwind
Copy link
Member Author

So I guess Github's API also does not support v-less tags 😆

$ curl -s https://api.github.com/repos/StylishThemes/GitHub-Dark/tags | jq -r '.[].name' | head
v1.21.32
v1.20.100
v1.20.99
v1.20.98
v1.20.97
v1.20.96
v1.20.95
v1.20.94
v1.20.93
v1.20.92

@silverwind
Copy link
Member Author

Thinking of flipping around the prefix behaviour of ver one more time: silverwind/versions#5.

@the-j0k3r
Copy link
Member

If we need this open, please re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants