Skip to content

Commit

Permalink
Fix choco template issue of typo of folder name sources vs files
Browse files Browse the repository at this point in the history
  • Loading branch information
darksidemilk committed Sep 8, 2024
1 parent 10c869a commit 1c81693
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 41 deletions.
8 changes: 4 additions & 4 deletions FogApi/FogApi.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: JJ Fullmer
#
# Generated on: 9/5/2024
# Generated on: 9/7/2024
#

@{
Expand All @@ -12,7 +12,7 @@
RootModule = 'FogApi.psm1'

# Version number of this module.
ModuleVersion = '2409.9.5'
ModuleVersion = '2409.9.6'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -305,9 +305,9 @@ PrivateData = @{

# ReleaseNotes of this module
ReleaseNotes = '
# 2409.9.5
# 2409.9.6
Updated and unified various docs, added icon packaging with best practicies for chocolatey and psgallery. Updated chocolatey packaging and build functions.'
Fix choco template issue of typo of folder name sources vs files'

# Prerelease string of this module
# Prerelease = ''
Expand Down
16 changes: 10 additions & 6 deletions chocoTemplate/PSGetModule/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ForEach ($destPath in $destinationPath) {
} else {
#this is the tools dir, make sure to not copy the chocolatey install scripts or psgetxml sources folder to the module install folder
try {
Copy-Item $_ -Destination $destPath -Exclude "sources","chocolateyInstall.ps1","chocolateyUninstall.ps1","chocolateyBeforeModify.ps1","PSGetModuleInfo-ps5.xml","PSGetModuleInfo-ps7.xml" -force -Recurse
Copy-Item $_ -Destination $destPath -Exclude "sources","files","chocolateyInstall.ps1","chocolateyUninstall.ps1","chocolateyBeforeModify.ps1","PSGetModuleInfo-ps5.xml","PSGetModuleInfo-ps7.xml" -force -Recurse
} catch {
if ($compare) {
Write-Verbose "The module may have already been installed, ignoring errors"
Expand All @@ -72,9 +72,9 @@ ForEach ($destPath in $destinationPath) {
#copy the psgetmoduleinfo files for the modules
Write-Verbose "Copy PSGetModuleInfo xml"
if ($destPath -match "\\Powershell\\Modules") {
$psgetXmlSrc = "$toolsDir\sources\PSGetModuleInfo-ps7.xml"
$psgetXmlSrc = "$toolsDir\files\PSGetModuleInfo-ps7.xml"
} else {
$psgetXmlSrc = "$toolsDir\sources\PSGetModuleInfo-ps5.xml"
$psgetXmlSrc = "$toolsDir\files\PSGetModuleInfo-ps5.xml"
}
Copy-Item $psgetXmlSrc "$destPath\PSGetModuleInfo.xml" -Force
$psgetxml = Get-Item "$destPath\PSGetModuleInfo.xml" -force;
Expand Down Expand Up @@ -115,9 +115,13 @@ ForEach ($destPath in $destinationRootPath) {
if ($null -ne $oldVersions) {
Write-verbose "Taking ownership of path $($_) and setting permissions";
$oldVersions | ForEach-Object {
$takeOwn = start-process -FilePath takeown.exe -ArgumentList "/F `"$($_)`" /R /A /D Y" -wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\logs\takeown-$modulename-paths.log"
Write-Verbose "Take Ownership result is $($takeOwn | out-string) - $(Get-content "C:\logs\takeown-$modulename-paths.log" | out-string)"
Remove-Item "C:\logs\takeown-$modulename-paths.log" -force -Recurse -ea 0;
$logDir = "$env:temp\logs"
if (!(Test-Path $logDir)) {
mkdir $logDir -ea 0;
}
$takeOwn = start-process -FilePath takeown.exe -ArgumentList "/F `"$($_)`" /R /A /D Y" -wait -NoNewWindow -PassThru -RedirectStandardOutput "$logDir\takeown-$modulename-paths.log"
Write-Verbose "Take Ownership result is $($takeOwn | out-string) - $(Get-content "$logDir\takeown-$modulename-paths.log" | out-string)"
Remove-Item "$logDir\takeown-$modulename-paths.log" -force -Recurse -ea 0;
}
try {
$perms = Grant-FullRightsToPath -path $oldVersions -recurseInherit -ea stop -wa 0 -wait -NoOutHost
Expand Down
6 changes: 6 additions & 0 deletions docs/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## 9.x

### 2409.9.6

Fix choco template issue of typo of folder name sources vs files


### 2409.9.5

Updated and unified various docs, added icon packaging with best practicies for chocolatey and psgallery. Updated chocolatey packaging and build functions.
Expand Down Expand Up @@ -390,5 +395,6 @@






63 changes: 32 additions & 31 deletions docs/en-us/about_FogApi.help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ LONG DESCRIPTION
or to simply have a command line method of controlling fog operations. This
essentially gives you a crossplatform commandline interface for fog tasks
and makes many things easier to automate.
Docs for this module can be found at https://fogapi.readthedocs.io/en/latest/
For more information about FOG see
* https://FOGProject.org
* https://docs.fogproject.org
* https://github.com/FOGProject
* https://github.com/FOGProject/fogproject
- https://FOGProject.org
- https://docs.fogproject.org
- https://github.com/FOGProject
- https://github.com/FOGProject/fogproject
- https://forums.fogproject.org

VERSIONING
The versioning of this module follows this pattern
Expand Down Expand Up @@ -51,50 +53,49 @@ Installation Methods
To Install this module follow these steps

INSTALL FROM PSGALLERY
* Easiest method: Install from PSGallery
- Easiest method: Install from PSGallery
https://www.powershellgallery.com/packages/FogApi with powershellget or
PSResourceGet * `Install-Module -name FogApi -Scope AllUsers` *
`Install-PSResource -Name FogApi -scope -Scope AllUsers` * updating is then
as easy as * `Update-Module -name FogApi` * `Update-PSResource -Name
PSResourceGet - `Install-Module -name FogApi -Scope AllUsers` -
`Install-PSResource -Name FogApi -scope -Scope AllUsers` - updating is then
as easy as - `Update-Module -name FogApi` - `Update-PSResource -Name
FogApi`

INSTALL WITH CHOCOLATEY
If you have chocolatey package manager, you can use the published package
that manually installs the module the same way the PSGet managers do.
https://community.chocolatey.org/packages/FogApi See https://chocolatey.org
for more information on chocolatey package manager
* Install with chocolatey (will install the module by copying the built
- Install with chocolatey (will install the module by copying the built
version to the powershell core and windows powershell paths, will remove any
existing versions) * `choco install fogapi -y` * Upgrading is as easy as
(note that you can also use this same command for a new install) *
existing versions) - `choco install fogapi -y` - Upgrading is as easy as
(note that you can also use this same command for a new install) -
`choco upgrade fogapi -y`

Manual Installation
USE ASSETS FROM THE RELEASE
Use Chocolatey, PackageManagement, Nuget or what have you to install the
chocolatey.nupkg or *.psgallery.nupkg file from the release assets
Extract the
builtModule.zip from the release and run `import-module` on the resulting
folder for a portable installation. You can also extract to the paths
outlined below in the manual build install steps for a more system wide
install
- Use Chocolatey, PackageManagement, Nuget or what have you to install the
chocolatey.nupkg or
.psgallery.nupkg file from the release assets - Extract the *builtModule.zip
from the release and run `import-module` on the resulting folder for a
portable installation. You can also extract to the paths outlined below in
the manual build install steps for a more system wide install

MANUALLY BUILD THE MODULE
* Manual Method:
* download the zip of this repo and extract it (or use git clone) * Or
- Manual Method:
- download the zip of this repo and extract it (or use git clone) - Or
clone the repo using your favorite git tool, you just need the FogApi Folder
this readme is in * Run the build.ps1 script
* Copy the built module folder (._module_build) into... * For Windows
Powershell v3-v5.1 * C:\Program
Files\WindowsPowershell\Modules\FogApi * For Powershell Core (pwsh) on
Windows v7+ * C:\Program Files\PowerShell\Modules\FogApi * For
Linux Powershell Core (pwsh) v7+ *
/usr/local/share/powershell/Modules/FogApi * For Mac Powershell Core
(pwsh) v7+ (untested) * /usr/local/share/powershell/Modules/FogApi
* I haven't tested this on a mac, the module folder may be
this readme is in - Run the build.ps1 script
- Copy the built module folder (._module_build) into... - For Windows
Powershell v3-v5.1 - C:\Program
Files\WindowsPowershell\Modules\FogApi - For Powershell Core (pwsh) on
Windows v7+ - C:\Program Files\PowerShell\Modules\FogApi - For
Linux Powershell Core (pwsh) v7+ -
/usr/local/share/powershell/Modules/FogApi - For Mac Powershell Core
(pwsh) v7+ (untested) - /usr/local/share/powershell/Modules/FogApi
- I haven't tested this on a mac, the module folder may be
somewhere else this is based on where it is in other powershell
core installs * Open powershell (as admin recommended)
* Run `Import-Module FogApi`
core installs - Open powershell (as admin recommended)
- Run `Import-Module FogApi`
The module is now installed.

UPDATE FROM PSGALLERY
Expand Down

0 comments on commit 1c81693

Please sign in to comment.