Skip to content
Permalink
Browse files
fix license gen scripts so they report errors better
  • Loading branch information
ahgittin committed Feb 18, 2016
1 parent 006a31e commit b11e10b60cb061c189d5478191638f69d0b64eac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
@@ -33,7 +33,7 @@ unset BROOKLYN_LICENSE_MODE
export BROOKLYN_LICENSE_MODE=source
echo MAKING LICENSES FOR: ${BROOKLYN_LICENSE_MODE}
export BROOKLYN_LICENSE_SPECIALS=-DonlyExtras=true
./make-one-license.sh > LICENSE.autogenerated
./make-one-license.sh > LICENSE.autogenerated || ( echo EXIT CODE $? && cat LICENSE.autogenerated && echo FAILED. See ERRORS above or in ../tmp_std... files. && false )
cp LICENSE.autogenerated ../../../LICENSE
# overwrite any existing licenses at root
for x in ../../../brooklyn-*/LICENSE ; do cp LICENSE.autogenerated $x ; done
@@ -54,7 +54,7 @@ for x in `cat projects-with-custom-licenses` ; do
export BROOKLYN_LICENSE_SPECIALS=-DonlyExtras=true
export BROOKLYN_LICENSE_EXTRAS_FILES=$x/src/main/license/source-inclusions.yaml
cp licenses/`basename $x`/* licenses/source
./make-one-license.sh > LICENSE.autogenerated || ( echo FAILED. See details in tmp_stdout/err. && false )
./make-one-license.sh > LICENSE.autogenerated || ( cat LICENSE.autogenerated && echo FAILED. See ERRORS above or in ../tmp_std... files. && false )
cp LICENSE.autogenerated ../$x/src/main/license/files/LICENSE
# also copy to root of that project *if* there is already a LICENSE file there
[ -f ../$x/LICENSE ] && cp LICENSE.autogenerated ../$x/LICENSE || true
@@ -60,7 +60,7 @@ mvn org.heneveld.maven:license-audit-maven-plugin:notices \
-DextrasFiles=${BROOKLYN_LICENSE_EXTRAS_FILES:-`cat licensing/extras-files`} \
${BROOKLYN_LICENSE_SPECIALS} \
-DoutputFile=licensing/notices.autogenerated \
> tmp_stdout 2> tmp_stderr
> tmp_stdout 2> tmp_stderr || ( cat tmp_stdout && echo "----ERRORS----" && cat tmp_stderr && false )
rm tmp_std*
popd > /dev/null
cat notices.autogenerated

0 comments on commit b11e10b

Please sign in to comment.