From 9b4cb4f57cbd3f50bbd125598b87b77164ed2569 Mon Sep 17 00:00:00 2001 From: Michael Arranaga Date: Thu, 27 Sep 2018 14:50:51 -0500 Subject: [PATCH] Added logging and env variable (#15) * Added logging and env variable * One more error checking * Updated reademe --- .scripts/deploy.ps1 | 20 ++++++++++++++------ README.md | 2 +- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.scripts/deploy.ps1 b/.scripts/deploy.ps1 index ca2d110..e025339 100644 --- a/.scripts/deploy.ps1 +++ b/.scripts/deploy.ps1 @@ -5,13 +5,21 @@ $PSScriptRootParent = Split-Path $PSScriptRoot -Parent Write-Host "[Deploy] PSScriptRootParent: ${PSScriptRootParent}" -Foregroundcolor 'Blue' -BackgroundColor 'Magenta' Write-Host "[Deploy] APPVEYOR_PROJECT_NAME: ${env:APPVEYOR_PROJECT_NAME}" -Foregroundcolor 'Blue' -BackgroundColor 'Magenta' +Write-Host "[Deploy] APPVEYOR_REPO_TAG: ${env:APPVEYOR_REPO_TAG}" -Foregroundcolor 'Blue' -BackgroundColor 'Magenta' +Write-Host "[Deploy] APPVEYOR_REPO_BRANCH: ${env:APPVEYOR_REPO_BRANCH}" -Foregroundcolor 'Blue' -BackgroundColor 'Magenta' -Deploy Module { - By PSGalleryModule ePOwerShell { - FromSource "${PSScriptRootParent}\dev\BuildOutput\ePOwerShell" - To PSGallery - WithOptions @{ - ApiKey = $env:PSGalleryApiKey +if ( + ($env:APPVEYOR_REPO_TAG -eq 'true') -and + ($env:APPVEYOR_REPO_BRANCH -eq 'master') +) { + Write-Host "Deploying to PSGallery" + Deploy Module { + By PSGalleryModule ePOwerShell { + FromSource "${PSScriptRootParent}\dev\BuildOutput\ePOwerShell" + To PSGallery + WithOptions @{ + ApiKey = $env:PSGalleryApiKey + } } } } \ No newline at end of file diff --git a/README.md b/README.md index eb5748d..a448aa6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build status](https://ci.appveyor.com/api/projects/status/t3kx0sy41ouw7cry?svg=true)](https://ci.appveyor.com/project/UNT-CAS/ePOwerShell) +[![Build status](https://ci.appveyor.com/api/projects/status/t3kx0sy41ouw7cry?svg=true)](https://ci.appveyor.com/project/UNTCAS/ePOwerShell) [![codecov](https://codecov.io/gh/UNT-CAS/ePOwerShell/branch/master/graph/badge.svg)](https://codecov.io/gh/UNT-CAS/ePOwerShell) [![version](https://img.shields.io/powershellgallery/v/ePOwerShell.svg)](https://www.powershellgallery.com/packages/ePOwerShell) [![downloads](https://img.shields.io/powershellgallery/dt/ePOwerShell.svg?label=downloads)](https://www.powershellgallery.com/stats/packages/ePOwerShell?groupby=Version)