diff --git a/.appveyor.yml b/.appveyor.yml index 0e5fcc8..97dc14e 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,64 +1,15 @@ -# Appveyor configuration template for Rust using rustup for Rust installation -# https://github.com/starkat99/appveyor-rust - -## Operating System (VM environment) ## - # Rust needs at least Visual Studio 2013 Appveyor OS for MSVC targets. image: Visual Studio 2015 -## Build Matrix ## -# This configuration will setup a build for each channel & target combination (12 windows -# combinations in all). -# -# There are 3 channels: stable, beta, and nightly. -# -# Alternatively, the full version may be specified for the channel to build using that specific -# version (e.g. channel: 1.5.0) -# -# The values for target are the set of windows Rust build targets. Each value is of the form -# -# ARCH-pc-windows-TOOLCHAIN -# -# Where ARCH is the target architecture, either x86_64 or i686, and TOOLCHAIN is the linker -# toolchain to use, either msvc or gnu. See https://www.rust-lang.org/downloads.html#win-foot for -# a description of the toolchain differences. -# See https://github.com/rust-lang-nursery/rustup.rs/#toolchain-specification for description of -# toolchains and host triples. -# -# Comment out channel/target combos you do not wish to build in CI. -# -# You may use the `cargoflags` and `RUSTFLAGS` variables to set additional flags for cargo commands -# and rustc, respectively. For instance, you can uncomment the cargoflags lines in the nightly -# channels to enable unstable features when building for nightly. Or you could add additional -# matrix entries to test different combinations of features. environment: GCP_PASSWD: - secure: GiLB9xoSis0z90cMZO88dhWAhRYpXI65mTuYYQsEOdnf+R1CZkuptKRB6mhdEbDliHu6jGWdW+7A6rpYmmTgpYuXcijONGn8mfXHenW7k48= - - matrix: - ### MSVC Toolchains ### - # Stable 64-bit MSVC - - channel: stable - target: x86_64-pc-windows-msvc - # Beta 64-bit MSVC - - channel: beta - target: x86_64-pc-windows-msvc + secure: /kPjA5Ff2c6ZDhU7y6TiUWiR4Jr4uXyLKWan35EXXTI= -# Only build against the branches that will have pull requests built against them (master). -# Otherwise creating feature branches on this repository and a pull requests against them will -# cause each commit to be tested twice, once for the branch and once for the pull request. branches: only: - master ## Install Script ## - -# This is the most important part of the Appveyor configuration. This installs the version of Rust -# specified by the 'channel' and 'target' environment variables from the build matrix. This uses -# rustup to install Rust. -# -# For simple configurations, instead of using the build matrix, you can simply set the -# default-toolchain and default-host manually here. install: # Install janus. - set PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin\;%PATH% @@ -72,7 +23,7 @@ install: - appveyor DownloadFile https://static.rust-lang.org/rustup/archive/1.7.0/i686-pc-windows-gnu/rustup-init.exe -FileName rustup-init.exe # Currently broken version. # - appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe - rustup-init -yv --default-toolchain %channel% --default-host %target% - - rustup-init -yv --default-toolchain %channel% --default-host %target% + - rustup-init -yv --default-toolchain stable --default-host x86_64-pc-windows-msvc - cmd: set PATH=%PATH%;%USERPROFILE%\.cargo\bin - rustup update - rustc -vV @@ -83,7 +34,6 @@ install: - cmd: set RUSTFLAGS=-C target-feature=+crt-static ## Build Script ## - cache: - '%USERPROFILE%\.cargo' @@ -91,7 +41,8 @@ cache: # build commands. Rust will automatically be placed in the PATH environment variable. build_script: - cargo build --all --verbose --release - - 7z a emerald-%channel%-%target%-%VERSION%.zip ./target/release/emerald-vault.exe + - cp ./target/release/emerald-vault.exe ./target/release/emerald.exe + - 7z a emerald-cli-win-%VERSION%.zip ./target/release/emerald.exe # Uses 'cargo test' to run tests and build. Alternatively, the project may call compiled programs # directly or perform other testing commands. Rust will automatically be placed in the PATH # environment variable. @@ -100,13 +51,12 @@ test_script: artifacts: - path: '*.zip' - name: emerald-vault -before_deploy: - # Set up GCP upload. - # - nuget install secure-file -ExcludeVersion - # - secure-file\tools\secure-file -decrypt gcloud-appveyor.json.enc -secret %GCP_PASSWD% -out .gcloud.json + name: emerald-cli + deploy_script: + - openssl aes-256-cbc -d -in gcloud-appveyor.json.enc -k %GCP_PASSWD% -out gcloud-appveyor.json -md sha256 - ps: >- If ($env:APPVEYOR_REPO_BRANCH -eq 'master') { - janus.exe deploy -to="builds.etcdevteam.com/emerald-vault/$env:VERSION_BASE/" -files="./*.zip" -key="./gcloud-appveyor.json.enc" + janus.exe deploy -to="builds.etcdevteam.com/emerald-cli/$env:VERSION_BASE/" -files="./*.zip" -key="./gcloud-appveyor.json" } + - rm gcloud-appveyor.json diff --git a/.travis.yml b/.travis.yml index 0ca790d..5cacdeb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,6 +37,7 @@ script: - cargo test --all --verbose - cargo build --all --verbose --release - cp ./target/release/emerald-vault "$HOME/.cargo/bin/" + - cp ./target/release/emerald "./target/release/" - bats cli.bats deploy: diff --git a/deploy.sh b/deploy.sh index 4fcefb5..771b027 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,14 +1,14 @@ #!/usr/bin/env bash VERSION_BASE=$(janus version -format='v%M.%m.x') -CLI_ARCHIVE_NAME="emerald-vault-$TRAVIS_OS_NAME-$APP_VERSION" +CLI_ARCHIVE_NAME="emerald-cli-$TRAVIS_OS_NAME-$APP_VERSION" zip -j "$CLI_ARCHIVE_NAME.zip" target/release/emerald tar -zcf "$CLI_ARCHIVE_NAME.tar.gz" target/release/emerald -echo "Deploy to http://builds.etcdevteam.com/emerald-vault/$VERSION_BASE/" +echo "Deploy to http://builds.etcdevteam.com/emerald-cli/$VERSION_BASE/" mkdir deploy mv *.zip *.tar.gz deploy/ ls -l deploy/ -janus deploy -to="builds.etcdevteam.com/emerald-vault/$VERSION_BASE/" -files="./deploy/*" -key="./gcloud-travis.json.enc" +janus deploy -to="builds.etcdevteam.com/emerald-cli/$VERSION_BASE/" -files="./deploy/*" -key="./gcloud-travis.json.enc" echo "Deployed" \ No newline at end of file diff --git a/gcloud-appveyor.json.enc b/gcloud-appveyor.json.enc index e4001bc..ea1a841 100644 Binary files a/gcloud-appveyor.json.enc and b/gcloud-appveyor.json.enc differ