Skip to content

Commit

Permalink
Release v0.0.1: Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
joeltimothyoh committed Oct 2, 2019
2 parents 22054a7 + 21be75b commit c047c7a
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "build/PSModulePublisher"]
path = build/PSModulePublisher
url = https://github.com/theohbrothers/PSModulePublisher.git
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PSMockModule
# PSMockModule [![Build Status](https://dev.azure.com/theohbrothers/PSMockModule/_apis/build/status/theohbrothers.PSMockModule?branchName=master)](https://dev.azure.com/theohbrothers/PSMockModule/_build/latest?definitionId=7&branchName=master)

A mock powershell module for templating and reference.

Expand Down
48 changes: 48 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
trigger:
branches:
include:
- '*'
tags:
include:
- '*'
pr: none

resources:
repositories:
- repository: PSModulePublisher
type: github
name: theohbrothers/PSModulePublisher
endpoint: theohbrothers
ref: refs/tags/v0.0.3

stages:
- stage: Build_Test
displayName: Build, Test
jobs:
- job: Windows
pool:
vmImage: windows-2019
steps:
- checkout: self
submodules: true
- template: azure-pipelines/windows/continuous-build.yml@PSModulePublisher
- job: Linux
pool:
vmImage: ubuntu-16.04
container: joeltimothyoh/powershell:6.1.0-ubuntu-18.04-git
steps:
- checkout: self
submodules: true
- template: azure-pipelines/linux/continuous-build.yml@PSModulePublisher
- stage: Publish
dependsOn:
- Build_Test
jobs:
- job: Windows
pool:
vmImage: windows-2019
steps:
- checkout: self
submodules: true
- template: azure-pipelines/windows/continuous-build.yml@PSModulePublisher
- template: azure-pipelines/common/run-publish.yml@PSModulePublisher
1 change: 1 addition & 0 deletions build/PSModulePublisher
Submodule PSModulePublisher added at cb287a
10 changes: 5 additions & 5 deletions build/definitions/modulemanifest/definition.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# - Initial release: Generate a unique GUID using New-GUID, and fill in all relevant details.
# - Initial release: Run 'New-GUID' to generate a unique GUID for identifying the module on PSGallery. Then fill in all other relevant details.
# - Subsequent releases: Update all relevant details.
# - To publish the module, git tag the commit to publish and push the tag.
# - You can run build.ps1 to simulate creating the module manifest and testing the module's exported functions etc. .
# - To publish the module, tag the commit that is to be published and push the tag.
# - You can use dev-entrypoint.ps1 in your development environment to simulate generation of the manifest.

@{
RootModule = 'PSMockModule.psm1'
# ModuleVersion = '' # Will be overridden in the CD process.
# ModuleVersion = '' # Value will be set on a release based on the release tag. Defaults to '0.0.0' in development environments and regular CI builds
GUID = '127aad2a-7be1-4a9e-ae60-e53625712540'
Author = 'The Oh Brothers'
CompanyName = 'The Oh Brothers'
Expand Down Expand Up @@ -34,7 +34,7 @@
# ModuleList = @()
# FileList = @()
PrivateData = @{
# PSData = @{ # Leave the PSData block commented out until further notice
# PSData = @{ # Properties within PSData will be correctly added to the manifest via Update-ModuleManifest without the PSData key. Leave the key commented out.
Tags = @(
'mock'
'module'
Expand Down
24 changes: 24 additions & 0 deletions tests/test.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[CmdletBinding()]
param()

Set-StrictMode -Version Latest
$global:PesterDebugPreference_ShowFullErrors = $true
$ErrorActionPreference = 'Stop'

"Installing dependencies" | Write-Host
# Install Pester if needed
$pester = Get-Module Pester -ListAvailable -ErrorAction SilentlyContinue
if ( ! $pester -or $pester.Version.Major -lt 4 ) {
Install-Module Pester -Force -Scope CurrentUser
}
Get-Module Pester -ListAvailable

# Begin tests
"`nBegin tests" | Write-Host
try {
Mock-Function1 -Verbose
Mock-Function2 -Verbose

}catch {
throw
}

0 comments on commit c047c7a

Please sign in to comment.