Skip to content
This repository was archived by the owner on Apr 28, 2018. It is now read-only.
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
29 changes: 15 additions & 14 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '0.1.0.{build}'
version: '{build}'
pull_requests:
do_not_increment_build_number: true
image: WMF 5
Expand All @@ -19,22 +19,22 @@ build_script:
- ps: |
$env:PATH = "c:\program files\dotnet;$env:PATH"

$version = $env:APPVEYOR_BUILD_VERSION
if ($env:APPVEYOR_REPO_TAG -eq "true") {
# Tags do not get build versions.
$version = $version.Remove($version.LastIndexOf(".")) + ".0"
}

# PowerShell does not support prerelease versions
$psversion = $version.Split("-")[0]

$projectFile = "src\Docker.PowerShell\project.json"
$project = Get-Content $projectFile -Raw | ConvertFrom-Json
$project.version = $version
ConvertTo-Json $project -Depth 100 | Out-File -Encoding UTF8 $projectFile
$version = $project.version

# Tags do not get build versions.
if ($env:APPVEYOR_REPO_TAG -ne "true") {
$version += ".$($env:APPVEYOR_BUILD_VERSION.split("-")[0])"

# Update the project.json version to include the build number.
$project.version = $version
ConvertTo-Json $project -Depth 100 | Out-File -Encoding UTF8 $projectFile
}

# Replace module manifest version.
$manifest = "src\Docker.PowerShell\Docker.psd1"
(Get-Content $manifest -Raw) -replace "ModuleVersion.+","ModuleVersion = '$psversion'" | Out-File $manifest
(Get-Content $manifest -Raw) -replace "ModuleVersion.+","ModuleVersion = '$version'" | Out-File $manifest

Get-Content $projectFile
Get-Content $manifest
Expand All @@ -43,7 +43,7 @@ build_script:
- ps: dotnet publish -f net46 -o $pwd\bin\net46 -c Release $pwd\src\Docker.PowerShell
- ps: dotnet publish -f netstandard1.6 -o $pwd\bin\netstandard1.6 -c Release $pwd\src\Docker.PowerShell
- ps: New-ExternalHelp -Path src\Docker.PowerShell\Help -OutputPath bin\en-US
- ps: nuget pack src/Docker.PowerShell/Docker.nuspec -BasePath bin -OutputDirectory bin -Symbols -Version $psversion
- ps: nuget pack src/Docker.PowerShell/Docker.nuspec -BasePath bin -OutputDirectory bin -Symbols -Version $version
test_script:
- ps: Register-PSRepository -Name test -SourceLocation $pwd\bin
- ps: Install-Module -Name Docker -Repository test -Force
Expand All @@ -54,6 +54,7 @@ test_script:
}
- ps: git checkout -- src/Docker.PowerShell/Docker.psd1
- ps: git checkout -- src/Docker.PowerShell/project.json
- ps: git checkout -- src/Docker.PowerShell/Docker.nuspec
- ps: git config core.autocrlf true
- ps: New-MarkdownHelp -Module Docker -OutputFolder src\Docker.PowerShell\Help -ErrorAction SilentlyContinue
- ps: Update-MarkdownHelp -Path src\Docker.PowerShell\Help
Expand Down
2 changes: 1 addition & 1 deletion src/Docker.PowerShell/Docker.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Docker</id>
<version>0.1.0.0</version>
<version>0.0.0</version>
<authors>Microsoft</authors>
<owners>microsoft</owners>
<licenseUrl>https://raw.githubusercontent.com/Microsoft/Docker-PowerShell/master/LICENSE</licenseUrl>
Expand Down
4 changes: 2 additions & 2 deletions src/Docker.PowerShell/Docker.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# Script module or binary module file associated with this manifest
RootModule = "Docker.psm1"

# Version number of this module.
ModuleVersion = '0.1.0.0'
# Version number of this module. Gets replaced by appveyor at build time.
ModuleVersion = '0.0.0'

# Minimum PowerShell version. This should match the reference assembly version
# in project.json (we require 5.0 due to dependencies on parameter completion).
Expand Down
2 changes: 1 addition & 1 deletion src/Docker.PowerShell/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.0-alpha",
"version": "0.1.0",
"description": "Docker.PowerShell Cmdlet Library",
"dependencies": {
"Docker.DotNet.X509": "2.124.2",
Expand Down