Skip to content
Permalink
Browse files
minor tweaks to scripts to do licensing and version changes
  • Loading branch information
ahgittin committed Oct 23, 2020
1 parent 087fd82 commit a3119db6b6823fa21632bd618ef34ae5198a5f19
Showing 3 changed files with 6 additions and 5 deletions.
@@ -55,7 +55,7 @@ prefix_and_join_array() {
PREFIX=$2
JOIN_BEFORE_PREFIX=$1
JOIN_AFTER_PREFIX=$3
echo -n ${PREFIX}$4
echo -n "${PREFIX}$4"
shift 4
while (($# >= 1)) ; do
echo -n "${JOIN_BEFORE_PREFIX}${PREFIX}${JOIN_AFTER_PREFIX}$1"
@@ -71,6 +71,7 @@ LICENSES=()
NOTICE_SECTION_TYPE=()
NOTICE_SECTION_ARG=()
LIBRARIES=()
LICENSE_MVN_OPTS=""

while [ ! -z "$*" ] ; do

@@ -150,15 +151,15 @@ fi

process_dependencies() {
echo running mvn license-audit-maven-plugin:notices
echo mvn -X org.heneveld.maven:license-audit-maven-plugin:notices \
echo mvn ${LICENSE_MVN_OPTS} org.heneveld.maven:license-audit-maven-plugin:notices \
-DlicensesPreferred="$PREFERRED_LICENSES" \
-DoverridesFile=$TEMP_METADATA_FILE \
-DoutputYaml=true \
-DoutputFile=$TEMP_NOTICE_DATA_FILE \
$@
echo writing to $TEMP_MVN_OUT
echo writing to $TEMP_MVN_OUT with LICENSE_MVN_OPTS \"${LICENSE_MVN_OPTS}\"

mvn -X org.heneveld.maven:license-audit-maven-plugin:notices \
mvn ${LICENSE_MVN_OPTS} org.heneveld.maven:license-audit-maven-plugin:notices \
-DlicensesPreferred="$PREFERRED_LICENSES" \
-DoverridesFile=$TEMP_METADATA_FILE \
-DoutputYaml=true \
@@ -51,7 +51,7 @@ NEW_VERSION=$2
# pass /dev/null as the first file to search in, so the command doesn't fail if find doesn't match any files;
# add || true for the case where grep doesn't have matches, so the script doesn't halt
# If there's an error "Argument list too long" add -n20 to xargs arguments and loop over $FILE around sed
FILES=`find . -type d \( -name ignored -or -name target -or \( -name .?\* -and -not -name .mvn \) \) -prune \
FILES=`find . -type d \( -name ignored -or -name target -or -name node_modules -or \( -name .?\* -and -not -name .mvn \) \) -prune \
-o -type f -not \( -name \*.log -or -name '*.war' -or -name '*.min.js' -or -name '*.min.css' -or -name '*.swp' \) -print0 | \
xargs -0 grep -l "${VERSION_MARKER}\|${VERSION_MARKER_NL}" /dev/null || true`

0 comments on commit a3119db

Please sign in to comment.