diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..df1177c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,40 @@ +language: rust + +env: + global: + - PROJECT_NAME=fie + +matrix: + include: + - os: osx + rust: stable + env: TARGET=x86_64-apple-darwin + cache: cargo + - os: linux + rust: stable + env: TARGET=x86_64-unknown-linux-gnu + cache: cargo + +sudo: false + +script: + - cargo build --target $TARGET + - cargo test --target $TARGET + +before_deploy: + - cargo build --release --target $TARGET + - zip "$PROJECT_NAME-$TRAVIS_TAG-$TARGET.zip" -j target/$TARGET/release/fie fie.toml + +deploy: + provider: releases + api_key: $GIT_TOKEN + file_glob: true + file: ${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}* + # don't delete the artifacts from previous phases + skip_cleanup: true + overwrite: true + # deploy when a new tag is pushed + on: + # channel to use to produce the release artifacts + condition: $TRAVIS_RUST_VERSION = stable + tags: true diff --git a/README.md b/README.md index 8bbd2c1..b6eee7a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Fie +[![Build status](https://ci.appveyor.com/api/projects/status/oc937oppd38x1y4y/branch/master?svg=true)](https://ci.appveyor.com/project/DoumanAsh/fie/branch/master) +[![Build Status](https://travis-ci.org/DoumanAsh/fie.svg?branch=master)](https://travis-ci.org/DoumanAsh/fie) + Small and cute social media CLI. ![Icon](icon.jpg) @@ -15,3 +18,22 @@ Configuration file is placed in the same directory as executable. Use [example](fie.toml) as reference. +## Usage + +``` +fie 0.1.0 +Douman + +Small and cute twitter app. + +USAGE: + fie.exe [SUBCOMMAND] + +FLAGS: + -h, --help Prints help information + -V, --version Prints version information + +SUBCOMMANDS: + help Prints this message or the help of the given subcommand(s) + post Creates new tweet +``` diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..66eb513 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,55 @@ +environment: + global: + PROJECT_NAME: fie + matrix: + - TARGET: i686-pc-windows-msvc + CHANNEL: stable + - TARGET: x86_64-pc-windows-msvc + CHANNEL: stable + +# Install Rust and Cargo +# (Based on from https://github.com/rust-lang/libc/blob/master/appveyor.yml) +install: + - curl -sSf -o rustup-init.exe https://win.rustup.rs + - rustup-init.exe --default-host %TARGET% --default-toolchain %CHANNEL% -y + - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin + - rustc -Vv + - cargo -V + +build: false + +test_script: + - cargo build + - cargo test + +before_deploy: + # Generate artifacts for release + - cargo build --release + - mkdir staging + - copy fie.toml staging + - copy target\release\*.exe staging + - cd staging + - 7z a ../%PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip *.exe *.toml + - appveyor PushArtifact ../%PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip + +deploy: + description: 'Windows release' + # All the zipped artifacts will be deployed + artifact: /.*\.zip/ + # - Go to 'https://github.com/settings/tokens/new' and generate a Token with only the + # `public_repo` scope enabled + # - Then go to 'https://ci.appveyor.com/tools/encrypt' and enter the newly generated token. + # - Enter the "encrypted value" below + auth_token: + secure: Jn3kh7c4SMFcIjYM7rNg+JG1g6zIyLt0PIKnkTvdqVfvsBPDQsiFxc87qYtjV2PH + provider: GitHub + # deploy when a new tag is pushed and only on the stable channel + on: + # channel to use to produce the release artifacts + # NOTE make sure you only release *once* per target + CHANNEL: stable + appveyor_repo_tag: true + +branches: + only: + - master