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

(PDK-1432) Autogenerate PowerShell modules from code #701

Merged
merged 1 commit into from
Aug 13, 2019

Conversation

glennsarti
Copy link
Contributor

Previously the PowerShell module code lived in the pdk-vanagon repository
however during release this required manual steps. This commit moves the
PowerShell module files to this repository and allows the use of ERB to update
them, for example, version and copyright year.

This commit also adds a beta PowerShell module which provides a much richer
and native PowerShell experience, by autogenerating from the CRI information.

@coveralls
Copy link

coveralls commented Jul 5, 2019

Coverage Status

Coverage remained the same at 92.065% when pulling e31e0c2 on glennsarti:add-powershell-modules into d6aabe1 on puppetlabs:master.

@glennsarti glennsarti requested a review from jpogran July 11, 2019 01:34
@glennsarti glennsarti changed the title {WIP} (PDK-1432) Autogenerate PowerShell modules from code (PDK-1432) Autogenerate PowerShell modules from code Jul 11, 2019
Copy link
Contributor

@scotje scotje left a comment

Choose a reason for hiding this comment

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

Couple of minor things but looks good overall!

rakelib/command_spec.rake Outdated Show resolved Hide resolved
@jpogran
Copy link
Contributor

jpogran commented Jul 17, 2019

Does module autoload conflict anything? I don't see any function or cmdlet name overlap, but the env variables are the same

@glennsarti
Copy link
Contributor Author

Bouncing PR as a test

@glennsarti glennsarti closed this Jul 18, 2019
@glennsarti glennsarti reopened this Jul 18, 2019
@glennsarti
Copy link
Contributor Author

Does module autoload conflict anything? I don't see any function or cmdlet name overlap, but the env variables are the same

As far as I can tell, no. And the shared env vars are sane. Not sure what the motivation behind the question is?

Are you wondering if it should be one module?

Note that we need changes to pdk-vanagon for this to take effect.

@jpogran
Copy link
Contributor

jpogran commented Jul 26, 2019

The reason I ask about the env variables is that some are different:

#old
$env:RUBY_DIR       = "$($env:DEVKIT_BASEDIR)\private\ruby\2.4.5"

#new
$env:RUBY_DIR       = "$($env:DEVKIT_BASEDIR)\private\ruby\2.4.4"

I was unsure if the module scope would save us, or are environment variables global scoped regardless of when/where they are created? The case I'm thinking is user loads old module, does some things, tries out new module and does some things, then goes back to old but ruby_dir is wrong now so it fails.

@glennsarti
Copy link
Contributor Author

Ahh whoops yes...one of them is wrong. Based on older and new PDK versions

Env will be process level

Previously the PowerShell module code lived in the pdk-vanagon repository
however during release this required manual steps.  This commit moves the
PowerShell module files to this repository and allows the use of ERB to update
them, for example, version and copyright year.

This commit also adds a beta PowerShell module which provides a much richer
and native PowerShell experience, by autogenerating from the CRI information.
@glennsarti
Copy link
Contributor Author

@jpogran Fixed the env vars issue. I wonder if I should make that an interpolated value so at least it's consistent...

@jpogran
Copy link
Contributor

jpogran commented Jul 30, 2019

I don't think that's required for this PR. I think that is more part of the work to get the beta module to a version 1

Copy link
Contributor

@jpogran jpogran left a comment

Choose a reason for hiding this comment

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

@scotje
Copy link
Contributor

scotje commented Aug 13, 2019

@glennsarti It looks like @jpogran approved this, so is there anything else we are waiting on before we merge this?

@jpogran jpogran merged commit d19fdda into puppetlabs:master Aug 13, 2019
@glennsarti glennsarti deleted the add-powershell-modules branch August 19, 2019 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants