Repository: AlexPikalov/cdrs (language: rust)

Issue:
Feat/221 continuous delivery
fixes #226 


Discussion / hints:

Fix patch:
diff --git a/.travis.yml b/.travis.yml
index 8006d68..827ee82 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,14 +10,13 @@ matrix:
     - rust: nightly
 
 before_install:
- - sudo update-java-alternatives -s java-8-oracle
- - export JAVA_HOME=/usr/lib/jvm/java-8-oracle
- - java -version
- - sudo rm -rf /var/lib/cassandra/*
- - if [ ! -d "apache-cassandra-3.11.2" ]; then wget https://archive.apache.org/dist/cassandra/3.11.2/apache-cassandra-3.11.2-bin.tar.gz && tar -xvzf apache-cassandra-3.11.2-bin.tar.gz; fi
- - sudo sh ./apache-cassandra-3.11.2/bin/cassandra -R
- - sleep 20
-
+  - sudo update-java-alternatives -s java-8-oracle
+  - export JAVA_HOME=/usr/lib/jvm/java-8-oracle
+  - java -version
+  - sudo rm -rf /var/lib/cassandra/*
+  - if [ ! -d "apache-cassandra-3.11.2" ]; then wget https://archive.apache.org/dist/cassandra/3.11.2/apache-cassandra-3.11.2-bin.tar.gz && tar -xvzf apache-cassandra-3.11.2-bin.tar.gz; fi
+  - sudo sh ./apache-cassandra-3.11.2/bin/cassandra -R
+  - sleep 20
 
 install:
   # - (cargo install rustfmt --force  || true)
@@ -28,6 +27,15 @@ script:
   - cargo build --verbose
   - cargo test --verbose -- --ignored
 
+deploy:
+  # deploy master to production
+  - provider: script
+    skip_cleanup: true
+    script: cargo publish --token $PUBLISH_TOKEN
+    on:
+      tags: true
+      branch: master
+
 addons:
   apt:
     packages:
@@ -56,4 +64,4 @@ after_success:
   bash <(curl -s https://codecov.io/bash) &&
   rm -rf target/cov &&
   for file in target/debug/cdrs-*; do mkdir -p "target/coverall/$(basename $file)"; kcov --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo,/usr/lib --verify "target/coverall/$(basename $file)" "$file"; done &&
-  echo "Uploaded code coverage"
\ No newline at end of file
+  echo "Uploaded code coverage"


Test patch: