Skip to content

change 'job Test -Safe' to '?Test' #595

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

Merged
merged 6 commits into from
Jan 3, 2018

Conversation

TylerLeonhardt
Copy link
Member

@TylerLeonhardt TylerLeonhardt commented Jan 2, 2018

Use new syntax for safe-running jobs. Also specified the max versions in AppVeyor and Travis.

Thanks @nightroman for the tip!

Addresses nightroman/Invoke-Build#113

@@ -16,7 +16,7 @@ install:
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force | Out-Null
Import-PackageProvider NuGet -Force | Out-Null
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | Out-Null
Install-Module InvokeBuild -RequiredVersion 3.2.1 -Scope CurrentUser -Force | Out-Null
Copy link
Contributor

Choose a reason for hiding this comment

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

So how did this break if we were specifying a required version of InvokeBuild? Updates to InvokeBuild shouldn't have broken our build.

Copy link
Member Author

Choose a reason for hiding this comment

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

It actually broke Travis who didn't have a required version.

Copy link
Contributor

@rkeithhill rkeithhill Jan 2, 2018

Choose a reason for hiding this comment

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

But that parameter is for Install-Module. Oh, so maybe Travis is using a version of PowerShellGet that doesn't have that parameter? Er, that doesn't make sense because this next line uses this parameter:

Install-Module platyPS -RequiredVersion 0.7.6 -Scope CurrentUser -Force | Out-Null 

I think it is OK to update occassionally to the latest version of InvokeBuild. I just don't know that we want to do that everytime we build. In fact, the -RequiredVersion parameter is meant to prevent the very error we encountered - "new release of InvokeBuild breaks our build".

OK, I think I see what is going on here. It is the travis build that is breaking, right? That build doesn't use appveyor.yml. It uses .travis.yml which runs build\travis.ps1. And that script has this line in it:

Install-Module InvokeBuild -Scope CurrentUser -Force

It seems to me that we need to add -RequiredVersion to the above command in travis.ps1 and bump it to 5.0.0 and put the parameter back in appveyor.yml and bump it up to 5.0.0 as well.

And add the -RequiredVersion to the install of platyPS in travis.ps1 as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Instead of -RequiredVersion I've specified -MaximumVersion so that we can still get patch updates without the harsh breaking changes of a top level version number (v5 -> v6 for example).

Let me know if you feel strongly otherwise 😄

Copy link
Collaborator

Choose a reason for hiding this comment

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

At least for platyPS we should stick with -RequiredVersion because they haven't hit 1.0 yet. I don't recall them having any big breaking changes, but there isn't anything stating they won't afaict

Copy link
Member Author

Choose a reason for hiding this comment

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

@SeeminglyScience I've updated it everywhere to require the 0.9.0 version of the package. This is the version that Travis was using. For Windows, this means it has been updated from 0.7.6 to 0.9.0. Yay consistency!

Copy link
Contributor

@rkeithhill rkeithhill left a comment

Choose a reason for hiding this comment

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

LGTM.

@TylerLeonhardt TylerLeonhardt merged commit 0e849e2 into PowerShell:master Jan 3, 2018
@TylerLeonhardt TylerLeonhardt deleted the fix-travis branch January 3, 2018 06:00
SeeminglyScience pushed a commit to SeeminglyScience/PowerShellEditorServices that referenced this pull request Feb 1, 2018
* change 'job Test -Safe' to '?Test'

* see if AppVeyor can handle no required version

* add maximum versions

* maximum, not required. typo

* switch platyps back to requiredversion

* consistant platyps version
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