forked from phoedos/pmd
Cache bundles on travis, use bundle exec
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -11,3 +11,5 @@ bin/
|
|||||||
*.patch
|
*.patch
|
||||||
*/src/site/site.xml
|
*/src/site/site.xml
|
||||||
pmd-core/dependency-reduced-pom.xml
|
pmd-core/dependency-reduced-pom.xml
|
||||||
|
.bundle
|
||||||
|
vendor
|
||||||
|
@ -34,7 +34,7 @@ before_install:
|
|||||||
# Install OracleJDK 10 - see https://sormuras.github.io/blog/2018-03-20-jdk-matrix.html
|
# Install OracleJDK 10 - see https://sormuras.github.io/blog/2018-03-20-jdk-matrix.html
|
||||||
install:
|
install:
|
||||||
- . ./install-jdk.sh -F 10 -L BCL
|
- . ./install-jdk.sh -F 10 -L BCL
|
||||||
- bundle install
|
- bundle install --without=release_notes_preprocessing
|
||||||
before_script: true
|
before_script: true
|
||||||
script: source .travis/build-$BUILD.sh
|
script: source .travis/build-$BUILD.sh
|
||||||
after_success: true
|
after_success: true
|
||||||
@ -71,6 +71,7 @@ notifications:
|
|||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- "$HOME/.m2"
|
- "$HOME/.m2"
|
||||||
|
- vendor/bundle
|
||||||
|
|
||||||
|
|
||||||
# Secure Keys, that need to be set for snapshot builds
|
# Secure Keys, that need to be set for snapshot builds
|
||||||
|
@ -28,8 +28,11 @@ if [ "${BUILD}" = "deploy" ]; then
|
|||||||
true
|
true
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# install the gems required for rendering the release notes
|
||||||
|
bundle install --with=release_notes_preprocessing
|
||||||
|
|
||||||
# renders, and skips the first 6 lines - the Jekyll front-matter
|
# renders, and skips the first 6 lines - the Jekyll front-matter
|
||||||
RENDERED_RELEASE_NOTES=$(.travis/render_release_notes.rb docs/pages/release_notes.md | tail -n +6)
|
RENDERED_RELEASE_NOTES=$(bundle exec .travis/render_release_notes.rb docs/pages/release_notes.md | tail -n +6)
|
||||||
|
|
||||||
# Assumes, the release has already been created by travis github releases provider
|
# Assumes, the release has already been created by travis github releases provider
|
||||||
RELEASE_ID=$(curl -s -H "Authorization: token ${GITHUB_OAUTH_TOKEN}" https://api.github.com/repos/pmd/pmd/releases/tags/pmd_releases/${RELEASE_VERSION}|jq ".id")
|
RELEASE_ID=$(curl -s -H "Authorization: token ${GITHUB_OAUTH_TOKEN}" https://api.github.com/repos/pmd/pmd/releases/tags/pmd_releases/${RELEASE_VERSION}|jq ".id")
|
||||||
|
@ -15,6 +15,9 @@ require "safe_yaml"
|
|||||||
require_relative "../docs/_plugins/rule_tag"
|
require_relative "../docs/_plugins/rule_tag"
|
||||||
require_relative "../docs/_plugins/custom_filters"
|
require_relative "../docs/_plugins/custom_filters"
|
||||||
|
|
||||||
|
# explicitly setting safe mode to get rid of the warning
|
||||||
|
SafeYAML::OPTIONS[:default_mode] = :safe
|
||||||
|
|
||||||
# START OF THE SCRIPT
|
# START OF THE SCRIPT
|
||||||
|
|
||||||
unless ARGV.length == 1 && File.exists?(ARGV[0])
|
unless ARGV.length == 1 && File.exists?(ARGV[0])
|
||||||
|
4
Gemfile
4
Gemfile
@ -3,9 +3,7 @@ source 'https://rubygems.org/'
|
|||||||
gem 'pmdtester', '~> 1.0.0.pre.beta3'
|
gem 'pmdtester', '~> 1.0.0.pre.beta3'
|
||||||
gem 'danger', '~> 5.6', '>= 5.6'
|
gem 'danger', '~> 5.6', '>= 5.6'
|
||||||
|
|
||||||
# I think we could skip installing these if we're not a release build
|
# This group is only needed during release (via .travis/release.sh and do-release.sh)
|
||||||
# https://docs.travis-ci.com/user/languages/ruby/#speeding-up-your-build-by-excluding-non-essential-dependencies
|
|
||||||
# I don't know where to put that in .travis.yml though...
|
|
||||||
group :release_notes_preprocessing do
|
group :release_notes_preprocessing do
|
||||||
gem 'liquid', '>=4.0.0'
|
gem 'liquid', '>=4.0.0'
|
||||||
gem 'safe_yaml', '>=1.0'
|
gem 'safe_yaml', '>=1.0'
|
||||||
|
@ -62,6 +62,10 @@ echo "Press enter to continue..."
|
|||||||
read
|
read
|
||||||
|
|
||||||
|
|
||||||
|
# install bundles needed for rendering release notes
|
||||||
|
bundle install with=release_notes_preprocessing --path vendor/bundle
|
||||||
|
|
||||||
|
|
||||||
export RELEASE_VERSION
|
export RELEASE_VERSION
|
||||||
export DEVELOPMENT_VERSION
|
export DEVELOPMENT_VERSION
|
||||||
export CURRENT_BRANCH
|
export CURRENT_BRANCH
|
||||||
@ -137,7 +141,7 @@ read
|
|||||||
|
|
||||||
# update release_notes_old
|
# update release_notes_old
|
||||||
OLD_RELEASE_NOTES=$(tail -n +8 docs/pages/release_notes_old.md)
|
OLD_RELEASE_NOTES=$(tail -n +8 docs/pages/release_notes_old.md)
|
||||||
NEW_RELEASE_NOTES=$(.travis/render_release_notes.rb docs/pages/release_notes.md | tail -n +6)
|
NEW_RELEASE_NOTES=$(bundle exec .travis/render_release_notes.rb docs/pages/release_notes.md | tail -n +6)
|
||||||
echo "$(head -n 7 docs/pages/release_notes_old.md)" > docs/pages/release_notes_old.md
|
echo "$(head -n 7 docs/pages/release_notes_old.md)" > docs/pages/release_notes_old.md
|
||||||
echo "$NEW_RELEASE_NOTES" >> docs/pages/release_notes_old.md
|
echo "$NEW_RELEASE_NOTES" >> docs/pages/release_notes_old.md
|
||||||
echo >> docs/pages/release_notes_old.md
|
echo >> docs/pages/release_notes_old.md
|
||||||
|
Reference in New Issue
Block a user