Rename version.{props => xml} and minor bootstrapper updates

This commit is contained in:
Nate McMaster 2017-07-24 16:22:31 -07:00
Родитель b31a576f08
Коммит cb8657af9e
8 изменённых файлов: 11 добавлений и 12 удалений

Просмотреть файл

@ -1,6 +1,6 @@
<Project>
<Import Project="dependencies.props" />
<Import Project="..\version.props" />
<Import Project="..\version.xml" />
<PropertyGroup>
<!-- these imports substitute for a package reference to Internal.AspNetCore.Sdk -->

Просмотреть файл

@ -1,5 +1,5 @@
<Project>
<Import Project="..\version.props" />
<Import Project="..\version.xml" />
<PropertyGroup>
<Version>$(VersionPrefix)</Version>

Просмотреть файл

@ -20,7 +20,7 @@ $artifacts = Join-Path $PSScriptRoot 'artifacts'
Get-ChildItem "$artifacts/build/*.nupkg" | Push-NuGetPackage -Feed $NuGetFeed -ApiKey $env:APIKEY -WhatIf:$WhatIfPreference
$settings = [xml] (Get-Content (Join-Path $PSScriptRoot 'version.props'))
$settings = [xml] (Get-Content (Join-Path $PSScriptRoot 'version.xml'))
$channelName = $settings.Project.PropertyGroup.KoreBuildChannel
Write-Host "Pushing azure artifacts for '$channelName' channel"

Просмотреть файл

@ -24,7 +24,7 @@ The base url where build tools can be downloaded. Overrides the value from the c
Updates KoreBuild to the latest version even if a lock file is present.
.PARAMETER ConfigFile
The path to the configuration file that stores values. Defaults to version.props.
The path to the configuration file that stores values. Defaults to version.xml.
.PARAMETER MSBuildArgs
Arguments to be passed to MSBuild
@ -38,7 +38,7 @@ The $ConfigFile is expected to be an XML file. It is optional, and the configura
.EXAMPLE
Example config file:
```xml
<!-- version.props -->
<!-- version.xml -->
<Project>
<PropertyGroup>
<KoreBuildChannel>dev</KoreBuildChannel>
@ -58,7 +58,7 @@ param(
[string]$ToolsSource,
[Alias('u')]
[switch]$Update,
[string]$ConfigFile = (Join-Path $PSScriptRoot 'version.props'),
[string]$ConfigFile = (Join-Path $PSScriptRoot 'version.xml'),
[Parameter(ValueFromRemainingArguments = $true)]
[string[]]$MSBuildArgs
)
@ -104,11 +104,11 @@ function Get-KoreBuild {
}
}
catch {
remove-item -Recurse -Force $korebuildPath -ErrorAction Ignore
Remove-Item -Recurse -Force $korebuildPath -ErrorAction Ignore
throw
}
finally {
remove-item $tmpfile -ErrorAction Ignore
Remove-Item $tmpfile -ErrorAction Ignore
}
}

Просмотреть файл

@ -11,7 +11,7 @@ RED="\033[0;31m"
MAGENTA="\033[0;95m"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
[ -z "${DOTNET_HOME:-}"] && DOTNET_HOME="$HOME/.dotnet"
config_file="$DIR/version.props"
config_file="$DIR/version.xml"
verbose=false
update=false
repo_path="$DIR"
@ -30,7 +30,7 @@ __usage() {
echo "Options:"
echo " --verbose Show verbose output."
echo " -c|--channel <CHANNEL> The channel of KoreBuild to download. Overrides the value from the config file.."
echo " --config-file <FILE> TThe path to the configuration file that stores values. Defaults to version.props."
echo " --config-file <FILE> TThe path to the configuration file that stores values. Defaults to version.xml."
echo " -d|--dotnet-home <DIR> The directory where .NET Core tools will be stored. Defaults to '\$DOTNET_HOME' or '\$HOME/.dotnet."
echo " --path <PATH> The directory to build. Defaults to the directory containing the script."
echo " -s|--tools-source <URL> The base url where build tools can be downloaded. Overrides the value from the config file."

Просмотреть файл

@ -1,4 +1,5 @@
<Project>
<Import Project="..\version.xml" />
<PropertyGroup>
<VersionSuffix>beta-$(BuildNumber)</VersionSuffix>
</PropertyGroup>

Просмотреть файл

@ -1,7 +1,5 @@
<Project>
<PropertyGroup>
<KoreBuildChannel>dev</KoreBuildChannel>
<VersionPrefix>2.1.0</VersionPrefix>
<VersionSuffix>alpha</VersionSuffix>
</PropertyGroup>
</Project>

Просмотреть файл