Skip to content

Commit

Permalink
Merge pull request #18 from mast-eu/BumpVersion
Browse files Browse the repository at this point in the history
bump version number and update versioning scheme
  • Loading branch information
mast-eu authored Jul 18, 2019
2 parents d35de0f + 7aaa4c5 commit 6b1c098
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 30 deletions.
54 changes: 51 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,65 @@
version: '{build}'
#---------------------------------#
# general configuration #
#---------------------------------#

image: Visual Studio 2017
# version format
version: 1.0.0.{build}

# version suffix, if any (e.g. '-RC1', '-beta' otherwise '')
environment:
version_suffix: '-RC1'

# Do not build on tags (GitHub and BitBucket)
skip_tags: true

# Maximum number of concurrent jobs for the project
max_jobs: 1

#---------------------------------#
# environment configuration #
#---------------------------------#

# Build worker image (VM template)
image:
- Visual Studio 2017
- Visual Studio 2019

# enable patching of Directory.Build.props
dotnet_csproj:
patch: true
file: '**\*.props'
version: '{version}'
assembly_version: '{version}'
file_version: '{version}'
informational_version: '{version}$(version_suffix)'
package_version: '{version}$(version_suffix)'

#---------------------------------#
# build configuration #
#---------------------------------#

build_script:
- ps: .\tools\Prepare-Release.ps1

#---------------------------------#
# tests configuration #
#---------------------------------#

test_script:
- ps: .\tools\Run-Tests.ps1

#---------------------------------#
# artifacts configuration #
#---------------------------------#

artifacts:
- path: .\*.zip
- path: .\*.nupkg

#---------------------------------#
# deployment configuration #
#---------------------------------#

# Commented out as we need to create a new signing policy.
# deploy:
# - provider: Webhook
Expand All @@ -23,4 +71,4 @@ artifacts:
# on_build_status_changed: false
# method: POST
# authorization:
# secure: RdmJQ3LAsGIbtqbxlcn7wF8ESTbPSDiR0Fmyt11mDl+avSDd0HKexHA+sWQA3cN1K8aVnKTzvjGTQS8DSDmLzQ==
# secure: RdmJQ3LAsGIbtqbxlcn7wF8ESTbPSDiR0Fmyt11mDl+avSDd0HKexHA+sWQA3cN1K8aVnKTzvjGTQS8DSDmLzQ==
15 changes: 8 additions & 7 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Do not use XML namespaces here (<Project xmlns="...">), because it would break patching of version numbers during builds on AppVeyor (https://github.com/appveyor/website/pull/409) -->
<Project>
<PropertyGroup>
<Authors>Git Extensions</Authors>
<Company>Git Extensions</Company>
<RepositoryUrl>https://github.com/gitextensions/gitextensions.pluginmanager</RepositoryUrl>
<LangVersion>latest</LangVersion>

<VersionPrefix>0.9.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Version>0.0.0</Version>
<AssemblyVersion>0.0.0.1</AssemblyVersion>
<FileVersion>0.0.0.1</FileVersion>
<InformationalVersion>0.0.0.1</InformationalVersion>
<PackageVersion>0.0.0.1</PackageVersion>
</PropertyGroup>

</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<GitExtensionsDebugPluginsPath>..\..\references\GitExtensions\UserPlugins\</GitExtensionsDebugPluginsPath>
<GitExtensionsReferenceSource>appveyor</GitExtensionsReferenceSource>
<GitExtensionsReferenceVersion>v3.2.0.5938</GitExtensionsReferenceVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
Expand Down
22 changes: 2 additions & 20 deletions tools/Prepare-Release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,24 @@ Push-Location $PSScriptRoot;
$targetPath = '..\';

$isAppveyor = $True -eq $env:APPVEYOR;
$isTag = 'true' -eq $env:APPVEYOR_REPO_TAG;

If (!$isAppveyor)
{
Write-Host "Running a local build";

$targetPath = Join-Path $targetPath 'artifacts';
$versionSuffix = $Null;
}
Elseif (!$isTag)
{
Write-Host "Running an Appveyor commit build";

$buildNumber = "build{0:D4}" -f [convert]::ToInt32($env:APPVEYOR_BUILD_NUMBER, 10);
$commitHash = ($env:APPVEYOR_REPO_COMMIT).Substring(0, 10);
$versionSuffix = $buildNumber + "+" + $commitHash;

Write-Host ("Version suffix: " + $versionSuffix);
}
Else
{
Write-Host ("Running an Appveyor release (tag '" + $env:APPVEYOR_REPO_TAG_NAME + "') build");

$versionSuffix = $null;
}

dotnet restore ..\GitExtensions.PluginManager.sln

msbuild ..\GitExtensions.PluginManager.sln /p:Configuration=Release -property:VersionSuffix=$versionSuffix -verbosity:minimal
msbuild ..\GitExtensions.PluginManager.sln /p:Configuration=Release -verbosity:minimal
if (!($LastExitCode -eq 0))
{
Write-Error -Message "MSBuild failed with $LastExitCode" -ErrorAction Stop
}

$packPath = Join-Path ".." $targetPath;
dotnet pack ..\src\GitExtensions.PluginManager -c Release -o $packPath --no-build /p:VersionSuffix=$versionSuffix
dotnet pack ..\src\GitExtensions.PluginManager -c Release -o $packPath --no-build

Copy-Item ..\src\GitExtensions.PluginManager\bin\Release\*.zip $targetPath

Expand Down

0 comments on commit 6b1c098

Please sign in to comment.