Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Commit 5b0e2f8

Browse files
committed
Merge remote-tracking branch 'origin/development'
2 parents 8004c30 + 23797a9 commit 5b0e2f8

24 files changed

+1260
-1761
lines changed

.vscode/tasks.json

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Build and Import Module",
8+
"command": "pwsh",
9+
"type": "shell",
10+
"windows": {
11+
"command": "c:\\windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe"
12+
},
13+
"args": [
14+
"-command",
15+
"Import-Module ${workspaceFolder}\\tools\\build.psm1;",
16+
"Install-DevelopmentModule",
17+
],
18+
"problemMatcher": [],
19+
"group": {
20+
"kind": "build",
21+
"isDefault": true
22+
},
23+
"presentation": {
24+
"echo": true,
25+
"reveal": "always",
26+
"focus": true,
27+
"panel": "shared",
28+
"showReuseMessage": true,
29+
"clear": false,
30+
}
31+
},
32+
{
33+
"label": "Install Dependencies",
34+
"command": "pwsh",
35+
"windows": {
36+
"command": "c:\\windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe"
37+
},
38+
"args": [
39+
"-command",
40+
"Import-Module ${workspaceFolder}\\tools\\build.psm1;",
41+
"Install-Dependencies"
42+
],
43+
"problemMatcher": [],
44+
"presentation": {
45+
"echo": true,
46+
"reveal": "always",
47+
"focus": true,
48+
"panel": "shared",
49+
"showReuseMessage": true,
50+
"clear": false,
51+
}
52+
},
53+
{
54+
"label": "Remove Development Module",
55+
"command": "pwsh",
56+
"windows": {
57+
"command": "c:\\windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe"
58+
},
59+
"args": [
60+
"-command",
61+
"Import-Module ${workspaceFolder}\\tools\\build.psm1;",
62+
"Uninstall-DevelopmentModule"
63+
],
64+
"problemMatcher": [],
65+
"presentation": {
66+
"echo": true,
67+
"reveal": "always",
68+
"focus": true,
69+
"panel": "shared",
70+
"showReuseMessage": true,
71+
"clear": false,
72+
}
73+
},
74+
{
75+
"label": "Run Full Test Suite",
76+
"command": "pwsh",
77+
"windows": {
78+
"command": "c:\\windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe"
79+
},
80+
"args": [
81+
"-command",
82+
"Import-Module ${workspaceFolder}\\tools\\build.psm1;",
83+
"Install-Dependencies;",
84+
"Invoke-PowerShellGetTest"
85+
],
86+
"problemMatcher": [],
87+
"presentation": {
88+
"echo": true,
89+
"reveal": "always",
90+
"focus": true,
91+
"panel": "shared",
92+
"showReuseMessage": true,
93+
"clear": false,
94+
}
95+
}
96+
]
97+
}

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
11
# Changelog
22

3+
## 2.1.3
4+
5+
New Features
6+
7+
- Added -Scope parameter to Update-Module (Thanks @lwajswaj!) (#471)
8+
- Added -Exclude parameter to Publish-Module (Thanks @Benny1007!) (#191)
9+
- Added -SkipAutomticTags parameter to Publish-Module (Thanks @awickham10!) (#452)
10+
11+
Bug Fix
12+
13+
- Fixed issue with finding modules using macOS and .NET Core 3.0
14+
315
## 2.1.2
416

517
New Feature
618

7-
- Added support for registering repositories with special characters
19+
- Added support for registering repositories with special characters (@Thanks jborean93!) (#442)
820

921
## 2.1.1
22+
1023
- Fix DSC resource folder structure
1124

1225
## 2.1.0

DSC/DSCResources/MSFT_PSModule/en-US/MSFT_PSModule.strings.psd1

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ ConvertFrom-StringData -StringData @'
2525
StartUnInstallModule = Begin invoking Remove-Item to remove the module '{0}' from the file system.
2626
InstalledSuccess = Successfully installed the module '{0}'
2727
UnInstalledSuccess = Successfully uninstalled the module '{0}'
28-
VersionMismatch = The installed Module '{0}' has the version: '{1}'
29-
RepositoryMismatch = The installed Module '{0}' is from '{1}' repository.
28+
VersionMismatch = The installed module '{0}' has the version: '{1}'
29+
RepositoryMismatch = The installed module '{0}' is from the '{1}' repository.
3030
FoundModulePath = Found the module path: '{0}'.
31-
MultipleModuleFound = Total: '{0}' modules found with the same name. Please use -RequiredVersion for filtering. Message: {1}
32-
InstallationPolicyWarning = You are installing the module '{0}' from an untrusted repository' {1}'. Your current InstallationPolicy is '{2}'. If you trust the repository, set the policy to "Trusted".
33-
InstallationPolicyFailed = Failed in the installation policy. Your current InstallationPolicy is '{0}' and the repository is '{1}'. If you trust the repository, set the policy to "Trusted".
31+
InstallationPolicyWarning = The module '{0}' was installed from the untrusted repository' {1}'. The InstallationPolicy is set to '{2}' to override the repository installation policy. If you trust the repository, set the repository installation policy to 'Trusted', that will also remove this warning.
32+
InstallationPolicyFailed = The current installation policy do not allow installation from this repository. Your current installation policy is '{0}' and the repository installation policy is '{1}'. If you trust the repository, either change the repository installation policy, or set the parameter InstallationPolicy to 'Trusted' to override the repository installation policy.
3433
GetTargetResourceMessage = Getting the current state of the module '{0}'.
3534
TestTargetResourceMessage = Determining if the module '{0}' is in the desired state.
3635
'@

README.md

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -106,29 +106,49 @@ Import-Module src/PowerShellGet
106106
```
107107

108108

109+
Local Development
110+
=================
111+
### Visual Studio Code:-
112+
1. Open VSCode choosing "Run as Administrator"
113+
2. Select Terminal>Run Task>Install Dependencies
114+
3. Select Terminal>Run Task>Build and Import Module
115+
116+
for subsequent changes you can just run 'Build and Import Module' or press <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>B</kbd>
117+
118+
### Standard PowerShell:-
119+
1. Open an administrative PowerShell prompt
120+
2. Run the following commands
121+
```PowerShell
122+
Import-Module "$ClonePath\tools\build.psm1"
123+
Install-Dependencies
124+
Install-DevelopmentModule
125+
```
126+
127+
This will take the published module from ./dist and install it into the powershell module path under the current version of PowerShellGet apending 9999 to the version number.
128+
129+
An explicit or implicit (such as when the test suite is invoked) import of the PowerShell get module will ensure the module version under development gets loaded.
130+
131+
It is therefore easy to see with ```Get Module``` that the version under development is loaded, like this:-
132+
133+
![alt text](./imgs/readme-getmodule-1.png "")
134+
135+
To remove this module and revert to the production PowerShellGallery published version, simply remove the folder from the module path. (if running VSCode select Terminal>Run Task>Remove Development Module).
136+
109137
Running Tests
110138
=============
111139

140+
### VSCode
141+
You can run the test task Terminal>Run Task>Run Full Test Suite
142+
143+
### Non VSCode
144+
112145
Pester-based PowerShellGet Tests are located in `<branch>/PowerShellGet/Tests` folder.
113146

114147
Run following commands in PowerShell Console with Administrator privileges.
115148

116149
```powershell
117150
Import-Module "$ClonePath\tools\build.psm1"
118-
119151
Install-Dependencies
120-
121-
# Option 1: Execute the following, replacing $ClonePath, when testing PowerShellGet module changes under $ClonePath.
122-
# $env:PSModulePath = "$ClonePath\src;$env:PSModulePath"
123-
124-
# Option 2: Execute the following commands to run tests with the merged PSModule.psm1
125-
<#
126-
Update-ModuleManifestFunctions
127-
Publish-ModuleArtifacts
128-
Install-PublishedModule
129-
#>
130-
131-
# Run tests
132152
Invoke-PowerShellGetTest
133153
```
134154

0 commit comments

Comments
 (0)