From 6cdc2b2ada64b4cb91976e3d8b6a7d6b21687f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=98=D0=B0=D0=BD=20=D0=93=D0=B5=D0=BE?= =?UTF-8?q?=D1=80=D0=B3=D0=B8=D0=B5=D0=B2=D1=81=D0=BA=D0=B8?= Date: Sun, 16 Jun 2019 18:23:03 +0200 Subject: [PATCH] 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 --- .travis.yml | 24 +++++++++++------------- Cargo.toml | 2 +- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index a94d94c..7bac0f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/Cargo.toml b/Cargo.toml index 335c36c..1b145f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "http-server" -version = "0.10.0" +version = "0.10.1" authors = ["Damjan Georgievski "] license = "MIT" readme = "README.md"