Skip to content

Commit

Permalink
Merge pull request #78 from ferventcoder/ticket/dev/deploy-on-tags
Browse files Browse the repository at this point in the history
(GH-77) Push to gallery on new tags
  • Loading branch information
ferventcoder authored Apr 27, 2017
2 parents d35bcc4 + 44d4f52 commit cad8c4d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
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

0 comments on commit cad8c4d

Please sign in to comment.