1 # This script takes care of packaging the build artifacts that will go in the 2 # release zipfile 3 4 $SRC_DIR = $PWD.Path 5 $STAGE = [System.Guid]::NewGuid().ToString() 6 7 Set-Location $ENV:Temp 8 New-Item -Type Directory -Name $STAGE 9 New-Item -Type Directory -Name "$STAGE\Dose Response" 10 Set-Location $STAGE 11 12 #$ZIP = "$SRC_DIR\$($Env:CRATE_NAME)-$($Env:APPVEYOR_REPO_TAG_NAME)-$($Env:TARGET).zip" 13 $TARFILE = "$SRC_DIR\$($Env:CRATE_NAME)-$($Env:APPVEYOR_REPO_TAG_NAME)-$($Env:TARGET).tar" 14 $TARBALL = "$TARFILE.gz" 15 16 Copy-Item "$SRC_DIR\target\$($Env:TARGET)\release\dose-response.exe" '.\Dose Response\Dose Response.exe' 17 # NOTE(shadower): we're bundling things statically now, don't upload the full build directory anymore: 18 #Copy-Item "$SRC_DIR\target\$($Env:TARGET)\release\build" -Destination '.\Dose Response\' -Recurse 19 # Use Get-Content/Set-Content which should convert the files from LF to CR LF endings 20 Get-Content "$SRC_DIR\README.md" | Set-Content '.\Dose Response\README.txt' 21 Get-Content "$SRC_DIR\COPYING.txt" | Set-Content '.\Dose Response\LICENSE.txt' 22 23 Copy-Item "$SRC_DIR\Debug.bat" '.\Dose Response\Debug.bat' 24 25 Add-Content -Path '.\Dose Response\VERSION.txt' -Value "Version: $($Env:APPVEYOR_REPO_TAG_NAME)" 26 Add-Content -Path '.\Dose Response\VERSION.txt' -Value "Full Version: $($Env:CRATE_NAME)-$($Env:APPVEYOR_REPO_TAG_NAME)-$($Env:TARGET)" 27 Add-Content -Path '.\Dose Response\VERSION.txt' -Value "Commit: $($Env:APPVEYOR_REPO_COMMIT)" 28 29 #7z a "$ZIP" * 30 7z a "$TARFILE" * 31 7z a "$TARBALL" "$TARFILE" 32 33 # Push-AppveyorArtifact "$ZIP" 34 Push-AppveyorArtifact "$TARBALL" 35 36 Remove-Item *.* -Force 37 Set-Location .. 38 Remove-Item $STAGE 39 Set-Location $SRC_DIR 40