Rename version.{props => xml} and minor bootstrapper updates
This commit is contained in:
Родитель
b31a576f08
Коммит
cb8657af9e
|
@ -1,6 +1,6 @@
|
||||||
<Project>
|
<Project>
|
||||||
<Import Project="dependencies.props" />
|
<Import Project="dependencies.props" />
|
||||||
<Import Project="..\version.props" />
|
<Import Project="..\version.xml" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- these imports substitute for a package reference to Internal.AspNetCore.Sdk -->
|
<!-- these imports substitute for a package reference to Internal.AspNetCore.Sdk -->
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<Project>
|
<Project>
|
||||||
<Import Project="..\version.props" />
|
<Import Project="..\version.xml" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>$(VersionPrefix)</Version>
|
<Version>$(VersionPrefix)</Version>
|
||||||
|
|
2
push.ps1
2
push.ps1
|
@ -20,7 +20,7 @@ $artifacts = Join-Path $PSScriptRoot 'artifacts'
|
||||||
|
|
||||||
Get-ChildItem "$artifacts/build/*.nupkg" | Push-NuGetPackage -Feed $NuGetFeed -ApiKey $env:APIKEY -WhatIf:$WhatIfPreference
|
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
|
$channelName = $settings.Project.PropertyGroup.KoreBuildChannel
|
||||||
|
|
||||||
Write-Host "Pushing azure artifacts for '$channelName' channel"
|
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.
|
Updates KoreBuild to the latest version even if a lock file is present.
|
||||||
|
|
||||||
.PARAMETER ConfigFile
|
.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
|
.PARAMETER MSBuildArgs
|
||||||
Arguments to be passed to MSBuild
|
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
|
||||||
Example config file:
|
Example config file:
|
||||||
```xml
|
```xml
|
||||||
<!-- version.props -->
|
<!-- version.xml -->
|
||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<KoreBuildChannel>dev</KoreBuildChannel>
|
<KoreBuildChannel>dev</KoreBuildChannel>
|
||||||
|
@ -58,7 +58,7 @@ param(
|
||||||
[string]$ToolsSource,
|
[string]$ToolsSource,
|
||||||
[Alias('u')]
|
[Alias('u')]
|
||||||
[switch]$Update,
|
[switch]$Update,
|
||||||
[string]$ConfigFile = (Join-Path $PSScriptRoot 'version.props'),
|
[string]$ConfigFile = (Join-Path $PSScriptRoot 'version.xml'),
|
||||||
[Parameter(ValueFromRemainingArguments = $true)]
|
[Parameter(ValueFromRemainingArguments = $true)]
|
||||||
[string[]]$MSBuildArgs
|
[string[]]$MSBuildArgs
|
||||||
)
|
)
|
||||||
|
@ -104,11 +104,11 @@ function Get-KoreBuild {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
remove-item -Recurse -Force $korebuildPath -ErrorAction Ignore
|
Remove-Item -Recurse -Force $korebuildPath -ErrorAction Ignore
|
||||||
throw
|
throw
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
remove-item $tmpfile -ErrorAction Ignore
|
Remove-Item $tmpfile -ErrorAction Ignore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ RED="\033[0;31m"
|
||||||
MAGENTA="\033[0;95m"
|
MAGENTA="\033[0;95m"
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
[ -z "${DOTNET_HOME:-}"] && DOTNET_HOME="$HOME/.dotnet"
|
[ -z "${DOTNET_HOME:-}"] && DOTNET_HOME="$HOME/.dotnet"
|
||||||
config_file="$DIR/version.props"
|
config_file="$DIR/version.xml"
|
||||||
verbose=false
|
verbose=false
|
||||||
update=false
|
update=false
|
||||||
repo_path="$DIR"
|
repo_path="$DIR"
|
||||||
|
@ -30,7 +30,7 @@ __usage() {
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " --verbose Show verbose output."
|
echo " --verbose Show verbose output."
|
||||||
echo " -c|--channel <CHANNEL> The channel of KoreBuild to download. Overrides the value from the config file.."
|
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 " -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 " --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."
|
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>
|
<Project>
|
||||||
|
<Import Project="..\version.xml" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionSuffix>beta-$(BuildNumber)</VersionSuffix>
|
<VersionSuffix>beta-$(BuildNumber)</VersionSuffix>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<KoreBuildChannel>dev</KoreBuildChannel>
|
<KoreBuildChannel>dev</KoreBuildChannel>
|
||||||
<VersionPrefix>2.1.0</VersionPrefix>
|
|
||||||
<VersionSuffix>alpha</VersionSuffix>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
Загрузка…
Ссылка в новой задаче