travis: windows releases work now

* on windows the target has a .exe suffix
  we need the file name to add to the release zip
* install zip on windows with choco
* also remove tests - since there aren't any

no code changes
This commit is contained in:
Дамјан Георгиевски 2019-06-16 18:23:03 +02:00
parent acedfa2a6c
commit 6cdc2b2ada
2 changed files with 12 additions and 14 deletions

View file

@ -1,6 +1,5 @@
language: rust
rust: stable
cache: cargo
sudo: false
env:
@ -14,21 +13,20 @@ matrix:
- os: linux
env: TARGET=x86_64-unknown-linux-gnu
- os: windows
env: TARGET=x86_64-pc-windows-msvc
env: TARGET=x86_64-pc-windows-msvc SUFFIX=.exe
script:
- cargo build ${TRAVIS_TAG:+--release} --target $TARGET
- cargo test ${TRAVIS_TAG:+--release} --target $TARGET
before_deploy:
- strip "target/$TARGET/release/$PROJECT_NAME"
- zip "$PROJECT_NAME-$TRAVIS_TAG-$TARGET.zip" -j "target/$TARGET/release/$PROJECT_NAME"
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install zip ; fi
- strip "target/$TARGET/release/${PROJECT_NAME}${SUFFIX}"
- zip ${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}.zip -j "target/$TARGET/release/${PROJECT_NAME}${SUFFIX}"
deploy:
provider: releases
api_key: $GIT_TOKEN
file_glob: true
file: ${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}*
file: ${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}.zip
# don't delete the artifacts from previous phases
skip_cleanup: true
overwrite: true
@ -40,10 +38,10 @@ deploy:
## Need to cache the whole `.cargo` directory to keep .crates.toml for
## cargo-update to work
#cache:
# directories:
# - ${TRAVIS_HOME}/.cargo
#
cache:
directories:
- ${TRAVIS_HOME}/.cargo
## But don't cache the cargo registry
#before_cache:
# - rm -rf ${TRAVIS_HOME}/.cargo/registry
before_cache:
- rm -rf ${TRAVIS_HOME}/.cargo/registry

View file

@ -1,6 +1,6 @@
[package]
name = "http-server"
version = "0.10.0"
version = "0.10.1"
authors = ["Damjan Georgievski <gdamjan@gmail.com>"]
license = "MIT"
readme = "README.md"