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

Added version:wbump task #31

Closed
wants to merge 4 commits into from
Closed

Added version:wbump task #31

wants to merge 4 commits into from

Conversation

mchf
Copy link
Member

@mchf mchf commented Jun 9, 2016

For bumping and creating a helper class for accessing package version within the code.

mchf added 2 commits June 9, 2016 14:11
A task which bumps version and creates a wrapper class for accessing
version in the project.
next if !File.directory?(filename)

module_name = File.basename(filename).downcase
target_file = "#{module_name}_version.rb"
Copy link
Member

Choose a reason for hiding this comment

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

The usual convention for a version file is to use version.rb, see find /usr/lib64/ruby/gems/ -name "*version*.rb".

Copy link
Member Author

Choose a reason for hiding this comment

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

well, I just wanted to customize the file name per package

@lslezak
Copy link
Member

lslezak commented Jun 9, 2016

And what's actually the purpose of the task? Where do you plan to use it?

BTW why wbump?

@mchf
Copy link
Member Author

mchf commented Jun 9, 2016

wbump == "write bumped version" ... If you have a better idea, I'm open ;-)

@mchf
Copy link
Member Author

mchf commented Jun 9, 2016

My main motivation was to write package version into logs to see what version of package customer uses (support config is not always awailable, ...)

@jreidinger
Copy link
Member

@mchf well, if you use save_y2logs, it contains also output of rpm -qa which have version of all packages, so you do not need support config. save_y2logs is enough.

@jreidinger
Copy link
Member

In general I do not like this pull request. It adds another duplicite location. We have in past problem that we have two files with version. Now only authoritative one is spec file, so it should be used from there and not having two sources of info again.

If you need access to version in source code, I suggest to add to yast2 class that get used yast module version like Version.for("yast2-network")?

@mchf
Copy link
Member Author

mchf commented Jun 15, 2016

In earlier times there were VERSION file which was imported into spec (template). What I did is opposite direction where version is extracted from spec and creates a class. What I don't like it to do something like rpm -q bcs it doesn't work in installer. Also support config and logs produced by save_y2logs is not always available.

@lslezak
Copy link
Member

lslezak commented Apr 3, 2017

Neither I like the version duplication. And using another non-standard task for version bumping is wrong. I bet somebody will use simple version:bump and it will get out of sync...

  • In installer you can check the /.packages.* files for the versions.
  • If the logs are missing you can ask for them 😉

I'd suggest just closing the PR without merging, sorry...

@jreidinger
Copy link
Member

so lets close it

@jreidinger jreidinger closed this Apr 3, 2017
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

Successfully merging this pull request may close these issues.

3 participants