-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sami Koskivaara
committed
Jan 15, 2020
1 parent
8197a06
commit b1358ce
Showing
3 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
# For local Windows workstation usage only | ||
# TODO: Create generic publisher for GitHub actions CI/CD | ||
|
||
$moduleName = 'ServiceNow-MIDServer' | ||
$moduleRoot = "$($env:SystemDrive)\Users\$($env:USERNAME)\Documents\PowerShell\Modules" | ||
Copy-Item -Path '.\ServiceNow-MIDServer' -Destination $moduleRoot -Recurse -Force | ||
Publish-Module -Name "ServiceNow-MIDServer" -NuGetApiKey $env:POWERSHELL_GALLERY_API_KEY | ||
|
||
$moduleSrcPath = Join-Path -Path $PSScriptRoot -ChildPath $moduleName | ||
$configFilePath = Join-Path -Path $moduleSrcPath -ChildPath "$($moduleName).psd1" | ||
|
||
$config = Import-PowerShellDataFile $configFilePath | ||
|
||
$installPath = Join-Path -Path (Join-Path $moduleRoot $moduleName) -ChildPath $config.ModuleVersion | ||
Copy-Item -Path $moduleSrcPath -Destination $installPath -Recurse -Force | ||
Publish-Module -Name $moduleName -NuGetApiKey $env:POWERSHELL_GALLERY_API_KEY |