update everything to DOTNET_CLI_VERSION
Some package_tool fixes
This commit is contained in:
parent
f88c9a88f2
commit
7011f9e604
21 changed files with 82 additions and 90 deletions
|
@ -39,6 +39,7 @@
|
|||
|
||||
"symlinks": {
|
||||
"bin/dotnet" : "usr/bin/dotnet",
|
||||
"bin/dotnet-build" : "usr/bin/dotnet-build",
|
||||
"bin/dotnet-compile" : "usr/bin/dotnet-compile",
|
||||
"bin/dotnet-compile-csc" : "usr/bin/dotnet-compile-csc",
|
||||
"bin/dotnet-compile-fsc" : "usr/bin/dotnet-compile-fsc",
|
||||
|
@ -48,6 +49,7 @@
|
|||
"bin/dotnet-repl" : "usr/bin/dotnet-repl",
|
||||
"bin/dotnet-repl-csi" : "usr/bin/dotnet-repl-csi",
|
||||
"bin/dotnet-restore" : "usr/bin/dotnet-restore",
|
||||
"bin/dotnet-dnx" : "usr/bin/dotnet-dnx",
|
||||
"bin/dotnet-test" : "usr/bin/dotnet-test",
|
||||
"bin/dotnet-resgen" : "usr/bin/dotnet-resgen"
|
||||
}
|
||||
|
|
|
@ -3,12 +3,6 @@
|
|||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
# Takes Parameters:
|
||||
# $1 = Input Directory
|
||||
# $2 = Output Directory
|
||||
# $3 = Package Version
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
@ -18,7 +12,7 @@ source $SCRIPT_DIR/scripts/debian_build_lib.sh
|
|||
|
||||
## Debian Package Creation Functions ##
|
||||
execute(){
|
||||
if ! parse_args_and_set_env_vars $@; then
|
||||
if ! parse_args_and_set_env_vars "$@"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -45,16 +39,16 @@ parse_args_and_set_env_vars(){
|
|||
while getopts ":n:v:i:o:h" opt; do
|
||||
case $opt in
|
||||
n)
|
||||
PACKAGE_NAME="$OPTARG"
|
||||
export PACKAGE_NAME="$OPTARG"
|
||||
;;
|
||||
v)
|
||||
PACKAGE_VERSION="$OPTARG"
|
||||
export PACKAGE_VERSION="$OPTARG"
|
||||
;;
|
||||
i)
|
||||
INPUT_DIR="$OPTARG"
|
||||
export INPUT_DIR="$OPTARG"
|
||||
;;
|
||||
o)
|
||||
OUTPUT_DIR="$OPTARG"
|
||||
export OUTPUT_DIR="$OPTARG"
|
||||
;;
|
||||
h)
|
||||
print_help
|
||||
|
@ -70,6 +64,11 @@ parse_args_and_set_env_vars(){
|
|||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Special Input Directories + Paths
|
||||
ABSOLUTE_PLACEMENT_DIR="${INPUT_DIR}/\$"
|
||||
PACKAGE_ROOT_PLACEMENT_DIR="${INPUT_DIR}/package_root"
|
||||
CONFIG="$INPUT_DIR/debian_config.json"
|
||||
|
||||
return 0
|
||||
}
|
||||
|
@ -95,34 +94,28 @@ print_help(){
|
|||
|
||||
validate_inputs(){
|
||||
local ret=0
|
||||
if [[ ! -d $ABSOLUTE_PLACEMENT_DIR ]]; then
|
||||
echo "ERROR: $ directory does not exist"
|
||||
echo $ABSOLUTE_PLACEMENT_DIR
|
||||
if [[ -z "$INPUT_DIR" ]]; then
|
||||
echo "ERROR: -i <INPUT_DIRECTORY> Not Specified"
|
||||
ret=1
|
||||
fi
|
||||
|
||||
if [[ ! -d $PACKAGE_ROOT_PLACEMENT_DIR ]]; then
|
||||
if [[ -z "$OUTPUT_DIR" ]]; then
|
||||
echo "ERROR: -o <OUTPUT_DIRECTORY> Not Specified."
|
||||
ret=1
|
||||
fi
|
||||
|
||||
if [[ ! -d "$PACKAGE_ROOT_PLACEMENT_DIR" ]]; then
|
||||
echo "ERROR: package_root directory does not exist"
|
||||
echo $PACKAGE_ROOT_PLACEMENT_DIR
|
||||
ret=1
|
||||
fi
|
||||
|
||||
if [[ ! -f $CONFIG ]]; then
|
||||
if [[ ! -f "$CONFIG" ]]; then
|
||||
echo "ERROR: debian_config.json file does not exist"
|
||||
echo $CONFIG
|
||||
ret=1
|
||||
fi
|
||||
|
||||
if [[ -z "$INPUT_DIR" ]];
|
||||
echo "ERROR: -i <INPUT_DIRECTORY> Not Specified"
|
||||
ret=1
|
||||
fi
|
||||
|
||||
if [[ -z "$OUTPUT_DIR" ]];
|
||||
echo "ERROR: -o <OUTPUT_DIRECTORY> Not Specified."
|
||||
ret=1
|
||||
fi
|
||||
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
|
@ -133,15 +126,10 @@ parse_config_and_set_env_vars(){
|
|||
[ -z "$PACKAGE_VERSION" ] && PACKAGE_VERSION="$($extract_base_cmd $CONFIG "release.package_version")"
|
||||
[ -z "$PACKAGE_NAME" ] && PACKAGE_NAME="$($extract_base_cmd $CONFIG "package_name")"
|
||||
|
||||
# Special Input Directories + Paths
|
||||
ABSOLUTE_PLACEMENT_DIR="${INPUT_DIR}/\$"
|
||||
PACKAGE_ROOT_PLACEMENT_DIR="${INPUT_DIR}/package_root"
|
||||
|
||||
# Inputs
|
||||
INPUT_SAMPLES_DIR="$INPUT_DIR/samples"
|
||||
INPUT_DOCS_DIR="$INPUT_DIR/docs"
|
||||
DOCS_JSON_PATH="$INPUT_DIR/docs.json"
|
||||
CONFIG="$INPUT_DIR/debian_config.json"
|
||||
|
||||
PACKAGE_SOURCE_DIR="${OUTPUT_DIR}/${PACKAGE_NAME}-${PACKAGE_VERSION}"
|
||||
INSTALL_ROOT="/usr/share/${PACKAGE_NAME}"
|
||||
|
@ -193,21 +181,23 @@ package_package_root_placement(){
|
|||
}
|
||||
|
||||
package_absolute_placement(){
|
||||
abs_in_package_dir="\$"
|
||||
|
||||
add_dir_to_install ${ABSOLUTE_PLACEMENT_DIR} $abs_in_package_dir
|
||||
|
||||
# Get List of all files in directory tree, relative to ABSOLUTE_PLACEMENT_DIR
|
||||
abs_files=( $(_get_files_in_dir_tree $ABSOLUTE_PLACEMENT_DIR) )
|
||||
|
||||
# For each file add a a system placement
|
||||
for abs_file in ${abs_files[@]}
|
||||
do
|
||||
parent_dir=$(dirname $abs_file)
|
||||
filename=$(basename $abs_file)
|
||||
|
||||
add_system_file_placement "$abs_in_package_dir/$abs_file" "/$parent_dir"
|
||||
done
|
||||
if [[ -d "$ABSOLUTE_PLACEMENT_DIR" ]]; then
|
||||
abs_in_package_dir="\$"
|
||||
|
||||
add_dir_to_install ${ABSOLUTE_PLACEMENT_DIR} $abs_in_package_dir
|
||||
|
||||
# Get List of all files in directory tree, relative to ABSOLUTE_PLACEMENT_DIR
|
||||
abs_files=( $(_get_files_in_dir_tree $ABSOLUTE_PLACEMENT_DIR) )
|
||||
|
||||
# For each file add a a system placement
|
||||
for abs_file in ${abs_files[@]}
|
||||
do
|
||||
parent_dir=$(dirname $abs_file)
|
||||
filename=$(basename $abs_file)
|
||||
|
||||
add_system_file_placement "$abs_in_package_dir/$abs_file" "/$parent_dir"
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
package_samples(){
|
||||
|
@ -268,4 +258,4 @@ generate_sample_manifest(){
|
|||
fi
|
||||
}
|
||||
|
||||
execute
|
||||
execute "$@"
|
||||
|
|
|
@ -18,7 +18,7 @@ run_unit_tests(){
|
|||
|
||||
run_integration_tests(){
|
||||
input_dir=$DIR/test/test_assets/test_package_layout
|
||||
output_dir=$DIR/p_out
|
||||
output_dir=$DIR/bin
|
||||
|
||||
# Create output dir
|
||||
mkdir -p $output_dir
|
||||
|
|
|
@ -10,7 +10,7 @@ param(
|
|||
$toolsDir = $toolsDir.TrimEnd('\')
|
||||
$versionArg = ""
|
||||
if ($versionSuffix -ne "") {
|
||||
$versionArg = "--version-suffix $VersionSuffix"
|
||||
$versionArg = "--version-suffix $versionSuffix"
|
||||
}
|
||||
|
||||
. "$PSScriptRoot\..\..\scripts\common\_common.ps1"
|
||||
|
|
|
@ -14,8 +14,8 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
|||
|
||||
REPOROOT="$( cd -P "$DIR/../../" && pwd )"
|
||||
|
||||
if [ -z "$DOTNET_BUILD_VERSION" ]; then
|
||||
echo "Provide a version number (DOTNET_BUILD_VERSION) $DOTNET_BUILD_VERSION" && exit 1
|
||||
if [ -z "$DOTNET_CLI_VERSION" ]; then
|
||||
echo "Provide a version number (DOTNET_CLI_VERSION) $DOTNET_CLI_VERSION" && exit 1
|
||||
fi
|
||||
|
||||
if [ "$(uname)" == "Darwin" ]; then
|
||||
|
@ -36,21 +36,21 @@ fi
|
|||
PACKAGE_DIR=$REPOROOT/artifacts/packages/pkg
|
||||
[ -d "$PACKAGE_DIR" ] || mkdir -p $PACKAGE_DIR
|
||||
|
||||
PACKAGE_NAME=$PACKAGE_DIR/dotnet-cli-x64.${DOTNET_BUILD_VERSION}.pkg
|
||||
PACKAGE_NAME=$PACKAGE_DIR/dotnet-cli-x64.${DOTNET_CLI_VERSION}.pkg
|
||||
#chmod -R 755 $STAGE2_DIR
|
||||
pkgbuild --root $STAGE2_DIR \
|
||||
--version $DOTNET_BUILD_VERSION \
|
||||
--version $DOTNET_CLI_VERSION \
|
||||
--scripts $DIR/scripts \
|
||||
--identifier com.microsoft.dotnet.cli.pkg.dotnet-osx-x64 \
|
||||
--install-location /usr/local/share/dotnet \
|
||||
$DIR/dotnet-osx-x64.$DOTNET_BUILD_VERSION.pkg
|
||||
$DIR/dotnet-osx-x64.$DOTNET_CLI_VERSION.pkg
|
||||
|
||||
cat $DIR/Distribution-Template | sed "/{VERSION}/s//$DOTNET_BUILD_VERSION/g" > $DIR/Dist
|
||||
cat $DIR/Distribution-Template | sed "/{VERSION}/s//$DOTNET_CLI_VERSION/g" > $DIR/Dist
|
||||
|
||||
productbuild --version $DOTNET_BUILD_VERSION --identifier com.microsoft.dotnet.cli --package-path $DIR --resources $DIR/resources --distribution $DIR/Dist $PACKAGE_NAME
|
||||
productbuild --version $DOTNET_CLI_VERSION --identifier com.microsoft.dotnet.cli --package-path $DIR --resources $DIR/resources --distribution $DIR/Dist $PACKAGE_NAME
|
||||
|
||||
#Clean temp files
|
||||
rm $DIR/dotnet-osx-x64.$DOTNET_BUILD_VERSION.pkg
|
||||
rm $DIR/dotnet-osx-x64.$DOTNET_CLI_VERSION.pkg
|
||||
rm $DIR/Dist
|
||||
|
||||
$REPOROOT/scripts/publish/publish.sh $PACKAGE_NAME
|
||||
|
|
0
packaging/release_debian_config.json
Normal file
0
packaging/release_debian_config.json
Normal file
|
@ -63,7 +63,7 @@ function RunCandle
|
|||
Write-Host Running candle..
|
||||
$AuthWsxRoot = Join-Path $RepoRoot "packaging\windows"
|
||||
|
||||
.\candle.exe -dDotnetSrc="$inputDir" -dMicrosoftEula="$RepoRoot\packaging\osx\resources\en.lproj\eula.rtf" -dBuildVersion="$env:DOTNET_BUILD_VERSION" -arch x64 `
|
||||
.\candle.exe -dDotnetSrc="$inputDir" -dMicrosoftEula="$RepoRoot\packaging\osx\resources\en.lproj\eula.rtf" -dBuildVersion="$env:DOTNET_CLI_VERSION" -arch x64 `
|
||||
-ext WixDependencyExtension.dll `
|
||||
"$AuthWsxRoot\dotnet.wxs" `
|
||||
"$AuthWsxRoot\provider.wxs" `
|
||||
|
@ -115,7 +115,7 @@ if(!(Test-Path $PackageDir))
|
|||
mkdir $PackageDir | Out-Null
|
||||
}
|
||||
|
||||
$DotnetMSIOutput = Join-Path $PackageDir "dotnet-win-x64.$env:DOTNET_BUILD_VERSION.msi"
|
||||
$DotnetMSIOutput = Join-Path $PackageDir "dotnet-win-x64.$env:DOTNET_CLI_VERSION.msi"
|
||||
|
||||
Write-Host "Creating dotnet MSI at $DotnetMSIOutput"
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ $ErrorActionPreference="Stop"
|
|||
|
||||
. "$RepoRoot\scripts\build\generate-version.ps1"
|
||||
|
||||
header "Building dotnet tools version $($env:DOTNET_BUILD_VERSION) - $Configuration"
|
||||
header "Building dotnet tools version $($env:DOTNET_CLI_VERSION) - $Configuration"
|
||||
header "Checking Pre-Reqs"
|
||||
|
||||
_ "$RepoRoot\scripts\test\check-prereqs.ps1"
|
||||
|
|
|
@ -19,7 +19,7 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
|||
source "$DIR/../common/_common.sh"
|
||||
source "$REPOROOT/scripts/build/generate-version.sh"
|
||||
|
||||
header "Building dotnet tools version $DOTNET_BUILD_VERSION - $CONFIGURATION"
|
||||
header "Building dotnet tools version $DOTNET_CLI_VERSION - $CONFIGURATION"
|
||||
header "Checking Pre-Reqs"
|
||||
|
||||
$REPOROOT/scripts/test/check-prereqs.sh
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
$ReleaseSuffix = "dev"
|
||||
$MajorVersion = 1
|
||||
$MinorVersion = 0
|
||||
$PatchVersion = 0
|
||||
$env:ReleaseSuffix = "dev"
|
||||
$env:MajorVersion = 1
|
||||
$env:MinorVersion = 0
|
||||
$env:PatchVersion = 0
|
||||
|
||||
$CommitCountVersion = (git rev-list --count HEAD).PadLeft(6, "0")
|
||||
$env:CommitCountVersion = (git rev-list --count HEAD).PadLeft(6, "0")
|
||||
|
||||
# Zero Padded Suffix for use with Nuget
|
||||
$VersionSuffix = "$ReleaseSuffix-$CommitCountVersion"
|
||||
$env:VersionSuffix = "$env:ReleaseSuffix-$env:CommitCountVersion"
|
||||
|
||||
$env:DOTNET_BUILD_VERSION = "$MajorVersion.$MinorVersion.$PatchVersion.$CommitCountVersion"
|
||||
$env:DOTNET_CLI_VERSION = "$env:MajorVersion.$env:MinorVersion.$env:PatchVersion.$env:CommitCountVersion"
|
|
@ -11,4 +11,4 @@ export PATCH_VERSION=0
|
|||
|
||||
export COMMIT_COUNT_VERSION=$(printf "%06d" $(git rev-list --count HEAD))
|
||||
|
||||
export DOTNET_BUILD_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_VERSION.$COMMIT_COUNT_VERSION
|
||||
export DOTNET_CLI_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_VERSION.$COMMIT_COUNT_VERSION
|
||||
|
|
|
@ -18,6 +18,6 @@ $PackageDir = "$RepoRoot\artifacts\packages\dnvm"
|
|||
|
||||
# Set reasonable defaults for unset variables
|
||||
setEnvIfDefault "DOTNET_INSTALL_DIR" "$(Convert-Path "$PSScriptRoot\..")\.dotnet_stage0\win7-x64"
|
||||
setEnvIfDefault "DOTNET_BUILD_VERSION" "0.1.0.0"
|
||||
setEnvIfDefault "DOTNET_CLI_VERSION" "0.1.0.0"
|
||||
setPathAndHomeIfDefault "$Stage2Dir"
|
||||
setVarIfDefault "Configuration" "Debug"
|
||||
|
|
|
@ -25,7 +25,7 @@ export STAGE2_DIR=$OUTPUT_ROOT/stage2
|
|||
export HOST_DIR=$OUTPUT_ROOT/corehost
|
||||
|
||||
[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$RID
|
||||
[ -z "$DOTNET_BUILD_VERSION" ] && export DOTNET_BUILD_VERSION=0.1.0.0
|
||||
[ -z "$DOTNET_CLI_VERSION" ] && export DOTNET_CLI_VERSION=0.1.0.0
|
||||
[ -z "$DOTNET_HOME" ] && export DOTNET_HOME=$STAGE2_DIR && export PATH=$STAGE2_DIR/bin:$PATH
|
||||
[ -z "$CONFIGURATION" ] && export CONFIGURATION=Debug
|
||||
[ -z "$NOCACHE" ] && export NOCACHE=""
|
||||
|
|
|
@ -34,7 +34,7 @@ info "Using code from: $DOCKER_HOST_SHARE_DIR"
|
|||
docker run -t --rm --sig-proxy=true \
|
||||
--name $DOTNET_BUILD_CONTAINER_NAME \
|
||||
-v $DOCKER_HOST_SHARE_DIR:/opt/code \
|
||||
-e DOTNET_BUILD_VERSION \
|
||||
-e DOTNET_CLI_VERSION \
|
||||
-e SASTOKEN \
|
||||
-e STORAGE_ACCOUNT \
|
||||
-e STORAGE_CONTAINER \
|
||||
|
|
|
@ -87,8 +87,8 @@ create_debian_package(){
|
|||
header "Packing .deb"
|
||||
|
||||
mkdir -p "$PACKAGE_OUTPUT_DIR"
|
||||
|
||||
"$PACKAGING_ROOT/package_tool/package_tool" -i "$PACKAGE_LAYOUT_DIR" -o "$PACKAGE_OUTPUT_DIR" -v $DOTNET_BUILD_VERSION -n $DOTNET_DEB_PACKAGE_NAME
|
||||
|
||||
"$PACKAGING_ROOT/package_tool/package_tool" -i "$PACKAGE_LAYOUT_DIR" -o "$PACKAGE_OUTPUT_DIR" -v $DOTNET_CLI_VERSION -n $DOTNET_DEB_PACKAGE_NAME
|
||||
}
|
||||
|
||||
test_debian_package(){
|
||||
|
|
|
@ -22,7 +22,7 @@ fi
|
|||
PACKAGE_DIR=$REPOROOT/artifacts/packages/dnvm
|
||||
[ -d "$PACKAGE_DIR" ] || mkdir -p $PACKAGE_DIR
|
||||
|
||||
PACKAGE_SHORT_NAME=dotnet-${OSNAME}-x64.${DOTNET_BUILD_VERSION}
|
||||
PACKAGE_SHORT_NAME=dotnet-${OSNAME}-x64.${DOTNET_CLI_VERSION}
|
||||
PACKAGE_NAME=$PACKAGE_DIR/${PACKAGE_SHORT_NAME}.tar.gz
|
||||
|
||||
cd $STAGE2_DIR
|
||||
|
|
|
@ -9,8 +9,8 @@ if(!(Test-Path $PackageDir)) {
|
|||
mkdir $PackageDir | Out-Null
|
||||
}
|
||||
|
||||
if(![string]::IsNullOrEmpty($env:DOTNET_BUILD_VERSION)) {
|
||||
$PackageVersion = $env:DOTNET_BUILD_VERSION
|
||||
if(![string]::IsNullOrEmpty($env:DOTNET_CLI_VERSION)) {
|
||||
$PackageVersion = $env:DOTNET_CLI_VERSION
|
||||
} else {
|
||||
$Timestamp = [DateTime]::Now.ToString("yyyyMMddHHmmss")
|
||||
$PackageVersion = "0.0.1-dev-t$Timestamp"
|
||||
|
|
|
@ -13,4 +13,4 @@ header "Generating dotnet MSI"
|
|||
_ "$RepoRoot\packaging\windows\generatemsi.ps1" @("$Stage2Dir")
|
||||
|
||||
header "Generating NuGet packages"
|
||||
_ "$RepoRoot\packaging\nuget\package.ps1" @("$Stage2Dir\bin", "$VersionSuffix")
|
||||
_ "$RepoRoot\packaging\nuget\package.ps1" @("$Stage2Dir\bin", "$env:VersionSuffix")
|
||||
|
|
|
@ -15,9 +15,9 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
|||
source "$DIR/../common/_common.sh"
|
||||
source "$REPOROOT/scripts/build/generate-version.sh"
|
||||
|
||||
if [ -z "$DOTNET_BUILD_VERSION" ]; then
|
||||
if [ -z "$DOTNET_CLI_VERSION" ]; then
|
||||
TIMESTAMP=$(date "+%Y%m%d%H%M%S")
|
||||
DOTNET_BUILD_VERSION=0.0.1-dev-t$TIMESTAMP
|
||||
DOTNET_CLI_VERSION=0.0.1-dev-t$TIMESTAMP
|
||||
fi
|
||||
|
||||
header "Generating tarball"
|
||||
|
|
|
@ -9,7 +9,7 @@ param(
|
|||
|
||||
function CheckRequiredVariables
|
||||
{
|
||||
if([string]::IsNullOrEmpty($env:DOTNET_BUILD_VERSION))
|
||||
if([string]::IsNullOrEmpty($env:DOTNET_CLI_VERSION))
|
||||
{
|
||||
return $false
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ function UploadBinaries($zipFile)
|
|||
{
|
||||
$result = -1
|
||||
$fileName = [System.IO.Path]::GetFileName($zipFile)
|
||||
$zipBlob = "$env:CHANNEL/Binaries/$env:DOTNET_BUILD_VERSION/$fileName"
|
||||
$zipBlob = "$env:CHANNEL/Binaries/$env:DOTNET_CLI_VERSION/$fileName"
|
||||
|
||||
if(-Not (UploadFile $zipBlob $zipFile))
|
||||
{
|
||||
|
@ -88,7 +88,7 @@ function UploadBinaries($zipFile)
|
|||
|
||||
|
||||
# update the index file too
|
||||
$indexContent = "Binaries/$env:DOTNET_BUILD_VERSION/$fileName"
|
||||
$indexContent = "Binaries/$env:DOTNET_CLI_VERSION/$fileName"
|
||||
$indexFile = "$env:TEMP\latest.win.index"
|
||||
$indexContent | Out-File -FilePath $indexFile
|
||||
|
||||
|
@ -115,7 +115,7 @@ function UploadBinaries($zipFile)
|
|||
function UploadInstallers($msiFile)
|
||||
{
|
||||
$fileName = [System.IO.Path]::GetFileName($msiFile)
|
||||
$msiBlob = "$env:CHANNEL/Installers/$env:DOTNET_BUILD_VERSION/$fileName"
|
||||
$msiBlob = "$env:CHANNEL/Installers/$env:DOTNET_CLI_VERSION/$fileName"
|
||||
|
||||
if(-Not (UploadFile $msiBlob $msiFile))
|
||||
{
|
||||
|
|
|
@ -54,8 +54,8 @@ execute(){
|
|||
validate_env_variables(){
|
||||
local ret=0
|
||||
|
||||
if [[ -z "$DOTNET_BUILD_VERSION" ]]; then
|
||||
warning "DOTNET_BUILD_VERSION environment variable not set"
|
||||
if [[ -z "$DOTNET_CLI_VERSION" ]]; then
|
||||
warning "DOTNET_CLI_VERSION environment variable not set"
|
||||
ret=1
|
||||
fi
|
||||
|
||||
|
@ -128,7 +128,7 @@ update_file_in_blob_storage(){
|
|||
upload_binaries_to_blob_storage(){
|
||||
local tarfile=$1
|
||||
local filename=$(basename $tarfile)
|
||||
local blob="$CHANNEL/Binaries/$DOTNET_BUILD_VERSION/$filename"
|
||||
local blob="$CHANNEL/Binaries/$DOTNET_CLI_VERSION/$filename"
|
||||
|
||||
if ! upload_file_to_blob_storage_azure_cli $blob $tarfile; then
|
||||
return 1
|
||||
|
@ -143,7 +143,7 @@ upload_binaries_to_blob_storage(){
|
|||
fi
|
||||
|
||||
# update the index file
|
||||
local indexContent="Binaries/$DOTNET_BUILD_VERSION/$filename"
|
||||
local indexContent="Binaries/$DOTNET_CLI_VERSION/$filename"
|
||||
local indexfile="latest.$OSNAME.index"
|
||||
local index_URL="https://$STORAGE_ACCOUNT.blob.core.windows.net/$STORAGE_CONTAINER/$CHANNEL/dnvm/$indexfile$SASTOKEN"
|
||||
update_file_in_blob_storage $index_URL $indexfile $indexContent
|
||||
|
@ -161,7 +161,7 @@ upload_binaries_to_blob_storage(){
|
|||
upload_installers_to_blob_storage(){
|
||||
local installfile=$1
|
||||
local filename=$(basename $installfile)
|
||||
local blob="$CHANNEL/Installers/$DOTNET_BUILD_VERSION/$filename"
|
||||
local blob="$CHANNEL/Installers/$DOTNET_CLI_VERSION/$filename"
|
||||
|
||||
if ! upload_file_to_blob_storage_azure_cli $blob $installfile; then
|
||||
return 1
|
||||
|
|
Loading…
Reference in a new issue