Skip to content

Commit

Permalink
Fix Windows release.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Sep 24, 2019
1 parent 6b85298 commit 95a7e1b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
10 changes: 9 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,15 @@ steps:
condition: and(startsWith(variables['TAG'], 'v'), eq(variables['CRATES_IO_PUBLISH'], '1'))
- bash: ci/build_release.sh
displayName: Build Release
condition: and(startsWith(variables['TAG'], 'v'), eq(variables['DEPLOY'], '1'))
condition: eq(variables['DEPLOY'], '1')
- task: ArchiveFiles@2
inputs:
includeRootFolder: false
archiveType: tar
tarCompression: gz
archiveFile: $(Build.ArtifactStagingDirectory)/cross-$(TAG)-$(TARGET).tar.gz
verbose: true
condition: eq(variables['DEPLOY'], '1')
- task: GithubRelease@0
displayName: Create GitHub Release
inputs:
Expand Down
11 changes: 9 additions & 2 deletions ci/build_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
set -eux

cargo install --path . --force
cross rustc --target "${TARGET}" --release -- -C lto
cross build --target "${TARGET}" --release

tar czf "${BUILD_ARTIFACTSTAGINGDIRECTORY}/cross-${TAG}-${TARGET}.tar.gz" -C "target/${TARGET}/release" cross
rm -rf "${BUILD_BINARIESDIRECTORY}"
mkdir "${BUILD_BINARIESDIRECTORY}"

if [[ -f "target/${TARGET}/release/cross.exe" ]]; then
mv "target/${TARGET}/release/cross.exe" "${BUILD_BINARIESDIRECTORY}/"
else
mv "target/${TARGET}/release/cross" "${BUILD_BINARIESDIRECTORY}/"
fi

0 comments on commit 95a7e1b

Please sign in to comment.