GUACAMOLE-2139: Fail build if licenses would be downloaded (unless explicitly overridden).
This commit is contained in:
2 files changed
+23
-3
No files matched your search
@@ -49,7 +49,17 @@
|
|||||||
# errors are encountered, failing the build. If this is undesirable (dependency
|
# errors are encountered, failing the build. If this is undesirable (dependency
|
||||||
# changes are being tested, a full list of all license errors across all
|
# changes are being tested, a full list of all license errors across all
|
||||||
# projects is needed, etc.), set the IGNORE_LICENSE_ERRORS environment variable
|
# projects is needed, etc.), set the IGNORE_LICENSE_ERRORS environment variable
|
||||||
# to "true".
|
# to "true" (by building with "-DignoreLicenseErrors" specified).
|
||||||
|
#
|
||||||
|
# Downloading licenses automatically
|
||||||
|
# ----------------------------------
|
||||||
|
#
|
||||||
|
# By default, this script will flag a license error if license information is
|
||||||
|
# missing for any dependency. If license information can be downloaded from a
|
||||||
|
# declared source (any of the "Source" URLs in the license information files),
|
||||||
|
# this script can be instructed to automatically update license information
|
||||||
|
# files by setting the DOWNLOAD_MISSING_LICENSES environment variable to
|
||||||
|
# "true" (by building with "-DdownloadMissingLicenses" specified).
|
||||||
#
|
#
|
||||||
# Structure of license information
|
# Structure of license information
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
@@ -557,8 +567,12 @@ EOF
|
|||||||
find "$LICENSE_INFO_DIR" -type f | xargs grep -l '^#[[:space:]]*Source:' \
|
find "$LICENSE_INFO_DIR" -type f | xargs grep -l '^#[[:space:]]*Source:' \
|
||||||
| while read FILENAME; do
|
| while read FILENAME; do
|
||||||
if [ -z "`get_license "$FILENAME" "$VERSION"`" ]; then
|
if [ -z "`get_license "$FILENAME" "$VERSION"`" ]; then
|
||||||
info "Downloading updated `basename "$FILENAME"` for `basename "$LICENSE_INFO_DIR"` ($VERSION)..."
|
if [ "$DOWNLOAD_MISSING_LICENSES" = "true" ]; then
|
||||||
append_license "$FILENAME" "$VERSION"
|
info "Downloading updated `basename "$FILENAME"` for `basename "$LICENSE_INFO_DIR"` ($VERSION)..."
|
||||||
|
append_license "$FILENAME" "$VERSION"
|
||||||
|
else
|
||||||
|
error "Missing license information in `basename "$FILENAME"` for `basename "$LICENSE_INFO_DIR"` ($VERSION). Rebuild with \"-DdownloadMissingLicenses\" to automatically download."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,11 @@
|
|||||||
or missing license headers). -->
|
or missing license headers). -->
|
||||||
<ignoreLicenseErrors>false</ignoreLicenseErrors>
|
<ignoreLicenseErrors>false</ignoreLicenseErrors>
|
||||||
|
|
||||||
|
<!-- Set to "true" to automatically download license information
|
||||||
|
for any files that have "Source" headers but lack specific
|
||||||
|
information for the current version of that dependency. -->
|
||||||
|
<downloadMissingLicenses>false</downloadMissingLicenses>
|
||||||
|
|
||||||
<!-- Set to "true" to perform automated checks for available dependency
|
<!-- Set to "true" to perform automated checks for available dependency
|
||||||
updates, including whether the declared versions of any
|
updates, including whether the declared versions of any
|
||||||
dependencies have associated CVEs in NVD. Beware that both checks
|
dependencies have associated CVEs in NVD. Beware that both checks
|
||||||
@@ -278,6 +283,7 @@
|
|||||||
</arguments>
|
</arguments>
|
||||||
<environmentVariables>
|
<environmentVariables>
|
||||||
<IGNORE_LICENSE_ERRORS>${ignoreLicenseErrors}</IGNORE_LICENSE_ERRORS>
|
<IGNORE_LICENSE_ERRORS>${ignoreLicenseErrors}</IGNORE_LICENSE_ERRORS>
|
||||||
|
<DOWNLOAD_MISSING_LICENSES>${downloadMissingLicenses}</DOWNLOAD_MISSING_LICENSES>
|
||||||
</environmentVariables>
|
</environmentVariables>
|
||||||
</configuration>
|
</configuration>
|
||||||
<goals>
|
<goals>
|
||||||
|
|||||||
Reference in new issue
Block a user