Skip to content
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

(GH-77) Push to gallery on new tags #78

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions AppVeyor/AppVeyorDeploy.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#---------------------------------#
# Header #
#---------------------------------#
#---------------------------------#
# Header #
#---------------------------------#
Write-Host 'Running AppVeyor deploy script' -ForegroundColor Yellow

#---------------------------------#
# Update module manifest #
#---------------------------------#
#---------------------------------#
# Update module manifest #
#---------------------------------#
Write-Host 'Creating new module manifest'

$ModuleManifestPath = Join-Path -path "$pwd" -ChildPath ("$env:ModuleName"+'.psd1')
Expand All @@ -14,11 +14,11 @@ $ModuleManifest = Get-Content $ModuleManifestPath -Raw
Write-Host "Updating module manifest to version: $env:APPVEYOR_BUILD_VERSION"
[regex]::replace($ModuleManifest,'(ModuleVersion = )(.*)',"`$1'$env:APPVEYOR_BUILD_VERSION'") | Out-File -LiteralPath $ModuleManifestPath

#---------------------------------#
# Publish to PS Gallery #
#---------------------------------#
#---------------------------------#
# Publish to PS Gallery #
#---------------------------------#

if ( ($env:APPVEYOR_REPO_NAME -notmatch 'chocolatey') -or ($env:APPVEYOR_REPO_BRANCH -notmatch 'master') )
if ( ($env:APPVEYOR_REPO_NAME -notmatch 'chocolatey') -or (!$env:APPVEYOR_REPO_TAG_NAME) )
{
Write-Host "Finished testing of branch: $env:APPVEYOR_REPO_BRANCH - Exiting"
exit;
Expand Down
32 changes: 16 additions & 16 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Community Chocolatey DSC Resource

This resource is aimed at getting and installing packages from the choco gallery.

The resource takes the name of the package and will then install that package.
The resource takes the name of the package and will then install that package.

See [ExampleConfig.ps1](ExampleConfig.ps1) for example usage.

Expand All @@ -19,30 +19,30 @@ See list of packages here: https://chocolatey.org/packages
Contributing
=============================

Happy to accept new features and fixes. Outstanding issues which can be worked on tagged HelpedWanted under issues.
Happy to accept new features and fixes. Outstanding issues which can be worked on tagged HelpedWanted under issues.

Submitting a PR
=============================

Here's the general process of fixing an issue in the DSC Resource Kit:
1. Fork the repository.
3. Clone your fork to your machine.
4. It's preferred to create a non-master working branch where you store updates.
5. Make changes.
6. Write pester tests to ensure that the issue is fixed.
7. Submit a pull request to the development branch.
8. Make sure all tests are passing in AppVeyor for your pull request.
9. Make sure your code does not contain merge conflicts.
10. Address comments (if any).

Build and Publishing
Here's the general process of fixing an issue in the DSC Resource Kit:
1. Fork the repository.
3. Clone your fork to your machine.
4. It's preferred to create a non-master working branch where you store updates.
5. Make changes.
6. Write pester tests to ensure that the issue is fixed.
7. Submit a pull request to the development branch.
8. Make sure all tests are passing in AppVeyor for your pull request.
9. Make sure your code does not contain merge conflicts.
10. Address comments (if any).

Build and Publishing
============================

AppVeyor is used to package up the resource and publish to the Powershell Gallery (on successful build from master branch only).
AppVeyor is used to package up the resource and publish to the Powershell Gallery (on successful build from a newly pushed tag only).

The AppVeyor scripts do the following:
- Test the resources using 'xDSCResourceDesigner'
- Verify best practises using 'PSScriptAnalyzer'
- Update the version in the manifest file
- Publish the module to the powershell gallery
- Checkin updated manifest file to github
- Checkin updated manifest file to github