Closed syxolk closed 7 years ago
Benefits of the first approach:
%PATH%
Drawbacks of the first approach:
choco uninstall
)Do you want to use your own chocolatey api key @mp4096 ?
e1e6500cd6d612faf9b4e4f0717997e9e94d41d8
Uhm, I added something, but I have no idea if it works.
I just got lemon-grabbed 😆 .
You probably need to add an artifact use its name instead of this regex: /.*\.nupkg/
(I don't know if it finds the package.)
huehuehue
Is the path .\packaging\windows_choco\package\indentex.nuspec
?
Edit: I'm dumb.
Oh shoot, what I'm thinking.
.\packaging\windows_choco\indentex.nuget
?
For the current version it's .\packaging\windows_choco\indentex.0.4.0.nupkg
.
So, /.\\packaging\\windows_choco\\indentex[.\w]+nupkg/
? Could you please verify if this regex works in PoSh?
Better add it here:
artifacts:
- path: 'packaging\windows_wix\*.msi'
name: indentex_installer
and then reference the artifact's name.
Oh, we already glob in artifacts. I dunno why, but I thought I must use a regex in the path specification.
@syxolk Thank you for this! Do you want to open a PR?
There seem to be three different approaches on how to build a chocolatey package. They all need a
.nuspec
file containing the id, version, description and other stuff.indentex.exe
into the package and use the auto-shim feature. Chocolatey will automatically move the executable to a folder where it is available on the path.indentex_*.msi
into the package and use Install-ChocolateyInstallPackage to install it. Atools\chocolateyInstall.ps1
is needed.indentex_*.msi
from GitHub during installation using Install-ChocolateyPackage. Atools\chocolateyInstall.ps1
is needed.All three variants seem to require elevated privileges because chocolatey uses
%ProgramData%
.On the difference between portable and installed packages.
Packaging: By calling
choco pack
aindentex.*.nupkg
is build.Deployment: Requires an API key for chocolatey. Call
choco push
to publish on chocolatey.org. This can be done automatically on appveyor.