Skip to content

Commit

Permalink
[Gradle Release Plugin] - pre tag commit: '1.1.0'.
Browse files Browse the repository at this point in the history
  • Loading branch information
bakdata-bot authored and AHeise committed Feb 12, 2019
1 parent 8dcc4c1 commit 3f3357b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
11 changes: 4 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,24 @@ matrix:
if: tag =~ ^\d+\.\d+\.\d+$
script:
- ./gradlew publishToNexus closeAndReleaseRepository -x test --stacktrace
before_deploy:
- ./gradlew generateChangelog -Pchangelog.releaseVersion=${TRAVIS_TAG} -Pchangelog.sinceTag=${TRAVIS_TAG}
- brew install jshon
- export BODY=$(jshon -s "$(cat CHANGELOG.md)"))
deploy:
provider: releases
api_key: ${GITHUB_TOKEN}
file_glob: true
file: "**/build/libs/*.jar"
name: "Release ${TRAVIS_TAG}"
body: ${BODY}
skip_cleanup: true
on:
tags: true
after_deploy:
- travis/github_release.sh
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- "$HOME/.m2/repository"
- "$HOME/.sonar/cache"
- "$HOME/.gradle"
- "$HOME/.sonar"
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"
- ".gradle"
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change Log

## [1.1.0](https://github.com/bakdata/dedupe/tree/1.1.0) (2019-02-11)
## [1.1.0](https://github.com/bakdata/dedupe/tree/1.1.0) (2019-02-12)
[Full Changelog](https://github.com/bakdata/dedupe/compare/1.0.1...1.1.0)

**Implemented enhancements:**
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version=1.0.0-SNAPSHOT
version=1.1.0
org.gradle.caching=true
org.gradle.parallel=true
14 changes: 14 additions & 0 deletions travis/github_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# override CHANGELOG temporarily for outputting a minimalistic changelog for github release
./gradlew generateChangelog -Pchangelog.releaseVersion=${TRAVIS_TAG} -Pchangelog.sinceTag=${TRAVIS_TAG}
body="$(cat CHANGELOG.md)"

id=$(curl -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/repos/$TRAVIS_REPO_SLUG/releases" | jq '.[] | select(.tag_name = "${TRAVIS_TAG}") | .id')

jq -n --arg body "$body" \
'{
body: $body
}' > CHANGELOG.json

curl -X PATCH -H "Authorization: token $GITHUB_TOKEN" --data @CHANGELOG.json "https://api.github.com/repos/$TRAVIS_REPO_SLUG/releases/$id"

0 comments on commit 3f3357b

Please sign in to comment.