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

Should not affect RequiredModules #9

Closed
rdefreitas opened this Issue Jan 9, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@rdefreitas

rdefreitas commented Jan 9, 2018

with a module version of "1.0.0.1" the following occurs:

before:

# Version number of this module.
ModuleVersion = '0.0.0.0';

...
# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @( `
    @{ ModuleName = 'AzureRM.Network'; ModuleVersion = '5.0.0'; }, `
    @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '4.0.0'; }, `
    @{ ModuleName = 'AzureRM.HDInsight'; ModuleVersion = '4.0.1'; }, `
    @{ ModuleName = 'AzureRM.DataLakeStore'; ModuleVersion = '5.0.0'; }, `
    @{ ModuleName = 'AzureRM.DataLakeAnalytics'; ModuleVersion = '4.0.0'; }, `
    @{ ModuleName = 'AzureRM.Storage'; ModuleVersion = '4.0.1'; }, `
    @{ ModuleName = 'Azure.Storage'; ModuleVersion = '4.0.0'; } `
    );

after

# Version number of this module.
ModuleVersion = '1.0.0.1';

...
# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @( `
    @{ ModuleName = 'AzureRM.Network'; ModuleVersion = '1.0.0.1'; }, `
    @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.0.1'; }, `
    @{ ModuleName = 'AzureRM.HDInsight'; ModuleVersion = '1.0.0.1'; }, `
    @{ ModuleName = 'AzureRM.DataLakeStore'; ModuleVersion = '1.0.0.1'; }, `
    @{ ModuleName = 'AzureRM.DataLakeAnalytics'; ModuleVersion = '1.0.0.1'; }, `
    @{ ModuleName = 'AzureRM.Storage'; ModuleVersion = '1.0.0.1'; }, `
    @{ ModuleName = 'Azure.Storage'; ModuleVersion = '1.0.0.1'; } `
    );

Adding this script to my build process changed the ModuleVersion on all modules in RequiredModules, which is obviously not desired.

Changing the Module Version should only occur to the first instance of ModuleVersion = '##.##.##.##'

@rdefreitas

This comment has been minimized.

Show comment
Hide comment
@rdefreitas

rdefreitas Jan 9, 2018

I don't have time to update your code myself right now but an easy fix might be to change your Regex to ^ModuleVersion(.*)$/m so this way it should return after the first match where ModuleVersion starts the line.

rdefreitas commented Jan 9, 2018

I don't have time to update your code myself right now but an easy fix might be to change your Regex to ^ModuleVersion(.*)$/m so this way it should return after the first match where ModuleVersion starts the line.

@RichieBzzzt RichieBzzzt self-assigned this Jan 9, 2018

@RichieBzzzt

This comment has been minimized.

Show comment
Hide comment
@RichieBzzzt

RichieBzzzt Jan 9, 2018

Contributor

Funnily enough I'd made the change before I saw your comment above! Didn't think to change the regex. however I have made a change in version 1.0.2567.0 that will resolve issue. Should be available now in Marketplace. If you can provide feedback here that it works for you I'l close issue.

Thanks again!

Contributor

RichieBzzzt commented Jan 9, 2018

Funnily enough I'd made the change before I saw your comment above! Didn't think to change the regex. however I have made a change in version 1.0.2567.0 that will resolve issue. Should be available now in Marketplace. If you can provide feedback here that it works for you I'l close issue.

Thanks again!

@rdefreitas

This comment has been minimized.

Show comment
Hide comment
@rdefreitas

rdefreitas Jan 9, 2018

Thanks Richie. I haven't gotten the chance to test it again, I'll let you know sometime tomorrow :)

rdefreitas commented Jan 9, 2018

Thanks Richie. I haven't gotten the chance to test it again, I'll let you know sometime tomorrow :)

@RichieBzzzt

This comment has been minimized.

Show comment
Hide comment
@RichieBzzzt

RichieBzzzt Jan 16, 2018

Contributor

Closing as fixed.

Contributor

RichieBzzzt commented Jan 16, 2018

Closing as fixed.

@rdefreitas rdefreitas closed this Jun 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment