Ver código fonte

Merge pull request #51 from jhonnymertz/only-tag-deploy

Setting travis to deploy based on release tags
Jhonny Mertz 6 anos atrás
pai
commit
b0615499de
3 arquivos alterados com 25 adições e 17 exclusões
  1. 0 4
      .travis.yml
  2. 18 10
      README.md
  3. 7 3
      deploy/publish.sh

+ 0 - 4
.travis.yml

@@ -6,10 +6,6 @@ cache:
   directories:
   - "$HOME/.m2"
 after_success:
-- openssl aes-256-cbc -pass pass:$ENCRYPTION_PASSWORD -in $GPG_DIR/pubring.gpg.enc
-  -out $GPG_DIR/pubring.gpg -d
-- openssl aes-256-cbc -pass pass:$ENCRYPTION_PASSWORD -in $GPG_DIR/secring.gpg.enc
-  -out $GPG_DIR/secring.gpg -d
 - "$GPG_DIR/publish.sh"
 env:
   global:

+ 18 - 10
README.md

@@ -12,25 +12,25 @@ Make sure you have Java Wrapper dependency added to your project.
 
 If you are using Gradle/Maven, see example below:
 
-##### Gradle
+#### Gradle
 In your `build.gradle`:
 ```groovy
-	dependencies {
-		compile 'com.github.jhonnymertz:java-wkhtmltopdf-wrapper:1.1.8-RELEASE'
-	}
+dependencies {
+    compile 'com.github.jhonnymertz:java-wkhtmltopdf-wrapper:1.1.8-RELEASE'
+}
 ```
 
-##### Maven
+#### Maven
 In your `pom.xml`:
 ```xml
-	<dependency>
+<dependency>
     <groupId>com.github.jhonnymertz</groupId>
     <artifactId>java-wkhtmltopdf-wrapper</artifactId>
     <version>1.1.8-RELEASE</version>
-  </dependency>
+</dependency>
 ```
 
-Usage
+Usage and Examples
 ------------
 ```
 Pdf pdf = new Pdf();
@@ -53,8 +53,8 @@ pdf.addTocParam(new Param("--xsl-style-sheet", "my_toc.xsl"));
 pdf.saveAs("output.pdf");
 ```
 
-Xvfb Support
-------------
+### Xvfb Support
+
 ```
 XvfbConfig xc = new XvfbConfig();
 xc.addParams(new Param("--auto-servernum"), new Param("--server-num=1"));
@@ -68,6 +68,14 @@ pdf.addPageFromUrl("http://www.google.com");
 pdf.saveAs("output.pdf");
 ```
 
+This is not an official Wkhtmltopdf product
+------------
+This library is not an official Wkhtmltopdf product. Support is available on a best-effort basis via github issue tracking. Pull requests are welcomed.
+
+Bugs
+------------
+- Tests are incomplete
+
 License
 ------------
 This project is available under MIT Licence.

+ 7 - 3
deploy/publish.sh

@@ -1,6 +1,10 @@
 #!/bin/bash
 
-if [[ ($TRAVIS_PULL_REQUEST == "false") && ($TRAVIS_BRANCH == "master") ]]; then
-    mvn deploy --settings $GPG_DIR/settings.xml -DperformRelease=true -DskipTests=true
-    exit $?
+if [ ! -z "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
+  openssl aes-256-cbc -pass pass:$ENCRYPTION_PASSWORD -in $GPG_DIR/pubring.gpg.enc -out $GPG_DIR/pubring.gpg -d
+  openssl aes-256-cbc -pass pass:$ENCRYPTION_PASSWORD -in $GPG_DIR/secring.gpg.enc -out $GPG_DIR/secring.gpg -d
+  mvn deploy --settings $GPG_DIR/settings.xml -DperformRelease=true -DskipTests=true
+  exit $?
+else
+  echo "This will not deploy because its not a release!"
 fi