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 easybuild from command line #1861

Merged
merged 13 commits into from Aug 12, 2016
Merged

Conversation

Caylo
Copy link
Contributor

@Caylo Caylo commented Aug 3, 2016

use: eb --install-latest-eb-release

@boegel boegel modified the milestone: v2.9.0 Aug 10, 2016
@@ -272,6 +272,10 @@ def main(args=None, logfile=None, do_build=None, testing=False, modtool=None):
search_easyconfigs(search_query, short=options.search_short, filename_only=options.search_filename,
terse=options.terse)

if options.update:
eb_file = find_easybuild_eb()
orig_paths.append(eb_file)
Copy link
Member

Choose a reason for hiding this comment

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

I would try and make sure that only EasyBuild is installed, and throw an error if other easyconfigs are installed at the same time?

@@ -1088,3 +1087,26 @@ def validate_github_token(token, github_user):
_log.info("GitHub token can be used for authenticated GitHub access, validation passed")

return sanity_check and token_test


def find_easybuild_eb():
Copy link
Member

Choose a reason for hiding this comment

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

@Caylo please add a unit test for this (just check whether it returns a path an existing easyconfig for EasyBuild)

Copy link
Member

Choose a reason for hiding this comment

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

also, rename to find_easybuild_easyconfig?

@boegel
Copy link
Member

boegel commented Aug 11, 2016

@Caylo needs a sync with develop to resolve conflicts

for eb_file in files:
txt = read_file(os.path.join(eb_parent_path, eb_file))
for line in txt.split('\n'):
if re.search(r'^version =', line):
Copy link
Member

Choose a reason for hiding this comment

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

use \s* rather than hardcoding the space before the =

version = scope['version']
file_versions.append((LooseVersion(version), eb_file))

fn = sorted(file_versions)[-1][1]
Copy link
Member

Choose a reason for hiding this comment

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

@Caylo let's throw a proper error here if file_versions is empty...

@boegel
Copy link
Member

boegel commented Aug 12, 2016

going in, thanks @Caylo!

@boegel boegel merged commit 7de8499 into easybuilders:develop Aug 12, 2016
@boegel boegel mentioned this pull request Sep 16, 2016
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.

None yet

2 participants