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

PATCH to indicate RC, Updated Version responses #1643

Merged
merged 4 commits into from Jan 29, 2019

Conversation

Projects
5 participants
@argakiig
Copy link
Collaborator

commented Jan 26, 2019

Use Patch Version to indicate if RC or not. If Patch version == 0 Final Release else RC appended

@argakiig argakiig requested review from wezrule and cryptocode Jan 26, 2019

@argakiig argakiig self-assigned this Jan 26, 2019

@argakiig argakiig added this to the V18.0 milestone Jan 26, 2019

@argakiig argakiig added this to CP 3 (2018-01-23) in V18 Jan 26, 2019

@argakiig argakiig requested a review from SergiySW Jan 26, 2019

@wezrule

This comment has been minimized.

Copy link
Collaborator

commented Jan 26, 2019

The same version strings are created in 4 different places (and some in different ways). It might be nice to construct both strings in one place (probably using macro stringification) and use those instead. There will be less duplication and less chance of mistakes. Something like:

#define xstr(a) str(a)
#define str(a) #a

#define NANO_MAJOR_MINOR_VERSION xstr(NANO_VERSION_MAJOR) "." xstr(NANO_VERSION_MINOR)
#define NANO_MAJOR_MINOR_RC_VERSION NANO_MAJOR_MINOR_VERSION "RC" xstr(NANO_VERSION_PATCH)

// Example use
BOOST_LOG (log) << "Node starting, version: " << NANO_MAJOR_MINOR_VERSION;

@argakiig argakiig force-pushed the argakiig:feature/add_rc_as_patch branch from 519db70 to 7f748c6 Jan 27, 2019

@argakiig

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 27, 2019

The same version strings are created in 4 different places (and some in different ways). It might be nice to construct both strings in one place (probably using macro stringification) and use those instead. There will be less duplication and less chance of mistakes. Something like:

#define xstr(a) str(a)
#define str(a) #a

#define NANO_MAJOR_MINOR_VERSION xstr(NANO_VERSION_MAJOR) "." xstr(NANO_VERSION_MINOR)
#define NANO_MAJOR_MINOR_RC_VERSION NANO_MAJOR_MINOR_VERSION "RC" xstr(NANO_VERSION_PATCH)

// Example use
BOOST_LOG (log) << "Node starting, version: " << NANO_MAJOR_MINOR_VERSION;

what about instead just adding the definitions for NANO_MAJOR_MINOR_VERSION and NANO_MAJOR_MINOR_RC_VERSION that's what I updated the PR to reflect

@wezrule

This comment has been minimized.

Copy link
Collaborator

commented Jan 27, 2019

I think it probably could have been done once in a common header file, but yeh that works as well

@clemahieu

This comment has been minimized.

Copy link
Collaborator

commented Jan 27, 2019

Would it be worth constructing this in the globals data structure? Something to avoid the use of macros?

@SergiySW
Copy link
Collaborator

left a comment

Thinking if this can be some global variables instead of private

argakiig added some commits Jan 28, 2019

@argakiig argakiig merged commit 01f0b86 into nanocurrency:master Jan 29, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@argakiig argakiig deleted the argakiig:feature/add_rc_as_patch branch Feb 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.