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

Update version number in config files to match the installed version #3

Merged
merged 7 commits into from
Oct 5, 2016

Conversation

rendhalver
Copy link
Contributor

Puppet is reverting this to 10.5.0.200 on every run and restarting each service.
Then the software is changing this to the installed version
when it when it starts each service.
This will make the version match the installed version.

Pete Brown added 5 commits September 30, 2016 16:37
Puppet is reverting this to 10.5.0.200 on every run and restarting each service.
Then the software is changing this to the installed version
when it  when it starts each service.
This will make the version match the installed version.
Match only exists in Puppet 4 so we need to use regsubst for backwards
compatability.
json_pure >= 2.0.2 doesn't work on Ruby < 2
Also fix syntax error in licence_server class
@rendhalver
Copy link
Contributor Author

rendhalver commented Oct 5, 2016

It seems that the config files get overwritten if the config version at the top of each file is older than the installed version.
So this should also fix #1

Puppet wasn't matching on [0-9]+ but does with \d+
@jar361
Copy link

jar361 commented Oct 5, 2016

lgtm

@@ -8,7 +8,8 @@ group :test do
gem "puppet-syntax", :require => false
gem 'metadata-json-lint', :require => false
gem 'simplecov', :require => false
gem 'json', :require => false
gem 'json', '1.8.3', :require => false
Copy link
Member

Choose a reason for hiding this comment

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

Why are we locking to specific version here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

json and json_pure 2.x don't work with ruby 1.9.3
1.8.3 is the last release before 2.0

@@ -12,6 +12,7 @@
{

$version = $lumenvox::options['media_server']['version']
$sem_ver = regsubst($version, '^(\d+\.\d+\.\d+)(.*)$','\1')
Copy link
Member

Choose a reason for hiding this comment

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

Are we sure this is sem_ver? Perhaps this is better called $version to make its meaning clear

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The $version variable get's used for installing the package and has extra characters in it that I strip out.
I thought $sem_ver was the best name because it is the version of the release.

Copy link
Member

Choose a reason for hiding this comment

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

Cool, then how about lumenvox_version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is much better. :)

@rendhalver rendhalver merged commit 8170e10 into master Oct 5, 2016
@rendhalver rendhalver deleted the bugfix/version_in_config_files branch October 5, 2016 19:06
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