diff --git a/detect10.ps1 b/detect10.ps1 index 07c8642..772b4ff 100755 --- a/detect10.ps1 +++ b/detect10.ps1 @@ -1,5 +1,24 @@ # Detect Powershell Script # Recommended Invocation: powershell "irm https://detect.blackduck.com/detect.ps1?$(Get-Random) | iex; detect" + +function Write-RebrandingMsg() { + Write-Host "***" + Write-Host "***" + Write-Host "*** Warning: Synopsys Detect has been rebranded as Black Duck Detect." + Write-Host "*** Please modify your processes to download Black Duck Detect from https://detect.blackduck.com/detect10.ps1 before February 14th, 2025, to prevent script and scan execution failure." + Write-Host "*** For more information, please see the domain name change announcement here: https://community.blackduck.com/s/question/0D5Uh00000JsImfKAF/black-duck-detect-scripts-and-the-impact-of-decommissioning-of-detectsynopsyscom" + Write-Host "***" + Write-Host "*** If you are using the Synopsys Detect Azure extension, migrate to the Black Duck Detect Azure extension before February 14th, 2025." + Write-Host "*** For more information, please see the extension release announcement here: https://community.blackduck.com/s/question/0D5Uh00000Mz1AcKAJ/black-duck-detect-azure-devops-ado-plugin-1000-has-been-released" + Write-Host "***" + Write-Host "*** If you are using Synopsys Detect Jenkins plugin (9.0.0 or prior), migrate to Black Duck Detect Jenkins Plugin 10.0.0 before February 14th, 2025." + Write-Host "*** For more information, please see the plugin release announcement here: https://community.blackduck.com/s/question/0D5Uh00000Mtso3KAB/black-duck-detect-jenkins-plugin-1000-has-been-released" + Write-Host "***" + Write-Host "***" +} + +Write-RebrandingMsg + $ProgressPreference = 'SilentlyContinue' function Get-EnvironmentVariable($Key, $DefaultValue) { if (-not (Test-Path Env:$Key)) { return $DefaultValue; }else { return (Get-ChildItem Env:$Key).Value; } } @@ -124,6 +143,8 @@ function Detect { $DetectArgs = $args; $DetectExitCode = Invoke-Detect -DetectJar $DetectJarFile -DetectArgs $DetectArgs + Write-RebrandingMsg + if ($EnvDetectExitCodePassthru -eq "1") { return $DetectExitCode } else { diff --git a/detect10.sh b/detect10.sh index ed2130e..e9f6be3 100755 --- a/detect10.sh +++ b/detect10.sh @@ -1,5 +1,23 @@ #!/bin/bash +write_rebranding_msg() { + echo "***" + echo "***" + echo "*** Warning: Synopsys Detect has been rebranded as Black Duck Detect." + echo "*** Please modify your processes to download Black Duck Detect from https://detect.blackduck.com/detect10.sh before February 14th, 2025, to prevent script and scan execution failure." + echo "*** For more information, please see the domain name change announcement here: https://community.blackduck.com/s/question/0D5Uh00000JsImfKAF/black-duck-detect-scripts-and-the-impact-of-decommissioning-of-detectsynopsyscom" + echo "***" + echo "*** If you are using the Synopsys Detect Azure extension, migrate to the Black Duck Detect Azure extension before February 14th, 2025." + echo "*** For more information, please see the extension release announcement here: https://community.blackduck.com/s/question/0D5Uh00000Mz1AcKAJ/black-duck-detect-azure-devops-ado-plugin-1000-has-been-released" + echo "***" + echo "*** If you are using Synopsys Detect Jenkins plugin (9.0.0 or prior), migrate to Black Duck Detect Jenkins Plugin 10.0.0 before February 14th, 2025." + echo "*** For more information, please see the plugin release announcement here: https://community.blackduck.com/s/question/0D5Uh00000Mtso3KAB/black-duck-detect-jenkins-plugin-1000-has-been-released" + echo "***" + echo "***" +} + +write_rebranding_msg + get_path_separator() { # Performs a check to see if the system is Windows based. if [[ `uname` == *"NT"* ]] || [[ `uname` == *"UWIN"* ]]; then @@ -226,6 +244,7 @@ run_detect() { eval "${JAVACMD} ${SCRIPT_ARGS}" RESULT=$? + write_rebranding_msg echo "Result code of ${RESULT}, exiting" exit ${RESULT} } diff --git a/detect8.ps1 b/detect8.ps1 index ce0d7ad..df1d8fa 100755 --- a/detect8.ps1 +++ b/detect8.ps1 @@ -1,5 +1,24 @@ # Detect Powershell Script # Recommended Invocation: powershell "irm https://detect.synopsys.com/detect.ps1?$(Get-Random) | iex; detect" + +function Write-RebrandingMsg() { + Write-Host "***" + Write-Host "***" + Write-Host "*** Warning: Synopsys Detect has been rebranded as Black Duck Detect." + Write-Host "*** Please modify your processes to download Black Duck Detect from https://detect.blackduck.com/detect8.ps1 before February 14th, 2025, to prevent script and scan execution failure." + Write-Host "*** For more information, please see the domain name change announcement here: https://community.blackduck.com/s/question/0D5Uh00000JsImfKAF/black-duck-detect-scripts-and-the-impact-of-decommissioning-of-detectsynopsyscom" + Write-Host "***" + Write-Host "*** If you are using the Synopsys Detect Azure extension, migrate to the Black Duck Detect Azure extension before February 14th, 2025." + Write-Host "*** For more information, please see the extension release announcement here: https://community.blackduck.com/s/question/0D5Uh00000Mz1AcKAJ/black-duck-detect-azure-devops-ado-plugin-1000-has-been-released" + Write-Host "***" + Write-Host "*** If you are using Synopsys Detect Jenkins plugin (9.0.0 or prior), migrate to Black Duck Detect Jenkins Plugin 10.0.0 before February 14th, 2025." + Write-Host "*** For more information, please see the plugin release announcement here: https://community.blackduck.com/s/question/0D5Uh00000Mtso3KAB/black-duck-detect-jenkins-plugin-1000-has-been-released" + Write-Host "***" + Write-Host "***" +} + +Write-RebrandingMsg + $ProgressPreference = 'SilentlyContinue' function Get-EnvironmentVariable($Key, $DefaultValue) { if (-not (Test-Path Env:$Key)) { return $DefaultValue; }else { return (Get-ChildItem Env:$Key).Value; } } @@ -124,6 +143,8 @@ function Detect { $DetectArgs = $args; $DetectExitCode = Invoke-Detect -DetectJar $DetectJarFile -DetectArgs $DetectArgs + Write-RebrandingMsg + if ($EnvDetectExitCodePassthru -eq "1") { return $DetectExitCode } else { diff --git a/detect8.sh b/detect8.sh index 737847a..a5e7a6b 100755 --- a/detect8.sh +++ b/detect8.sh @@ -1,6 +1,23 @@ #!/bin/bash -echo "Detect Shell Script ${SCRIPT_VERSION}" +write_rebranding_msg() { + echo "***" + echo "***" + echo "*** Warning: Synopsys Detect has been rebranded as Black Duck Detect." + echo "*** Please modify your processes to download Black Duck Detect from https://detect.blackduck.com/detect8.sh before February 14th, 2025, to prevent script and scan execution failure." + echo "*** For more information, please see the domain name change announcement here: https://community.blackduck.com/s/question/0D5Uh00000JsImfKAF/black-duck-detect-scripts-and-the-impact-of-decommissioning-of-detectsynopsyscom" + echo "***" + echo "*** If you are using the Synopsys Detect Azure extension, migrate to the Black Duck Detect Azure extension before February 14th, 2025." + echo "*** For more information, please see the extension release announcement here: https://community.blackduck.com/s/question/0D5Uh00000Mz1AcKAJ/black-duck-detect-azure-devops-ado-plugin-1000-has-been-released" + echo "***" + echo "*** If you are using Synopsys Detect Jenkins plugin (9.0.0 or prior), migrate to Black Duck Detect Jenkins Plugin 10.0.0 before February 14th, 2025." + echo "*** For more information, please see the plugin release announcement here: https://community.blackduck.com/s/question/0D5Uh00000Mtso3KAB/black-duck-detect-jenkins-plugin-1000-has-been-released" + echo "***" + echo "***" + +} + +write_rebranding_msg get_path_separator() { # Performs a check to see if the system is Windows based. @@ -228,6 +245,7 @@ run_detect() { eval "${JAVACMD} ${SCRIPT_ARGS}" RESULT=$? + write_rebranding_msg echo "Result code of ${RESULT}, exiting" exit ${RESULT} } diff --git a/detect9.ps1 b/detect9.ps1 index fc24e47..f905f26 100755 --- a/detect9.ps1 +++ b/detect9.ps1 @@ -1,5 +1,24 @@ # Detect Powershell Script # Recommended Invocation: powershell "irm https://detect.synopsys.com/detect.ps1?$(Get-Random) | iex; detect" + +function Write-RebrandingMsg() { + Write-Host "***" + Write-Host "***" + Write-Host "*** Warning: Synopsys Detect has been rebranded as Black Duck Detect." + Write-Host "*** Please modify your processes to download Black Duck Detect from https://detect.blackduck.com/detect9.ps1 before February 14th, 2025, to prevent script and scan execution failure." + Write-Host "*** For more information, please see the domain name change announcement here: https://community.blackduck.com/s/question/0D5Uh00000JsImfKAF/black-duck-detect-scripts-and-the-impact-of-decommissioning-of-detectsynopsyscom" + Write-Host "***" + Write-Host "*** If you are using the Synopsys Detect Azure extension, migrate to the Black Duck Detect Azure extension before February 14th, 2025." + Write-Host "*** For more information, please see the extension release announcement here: https://community.blackduck.com/s/question/0D5Uh00000Mz1AcKAJ/black-duck-detect-azure-devops-ado-plugin-1000-has-been-released" + Write-Host "***" + Write-Host "*** If you are using Synopsys Detect Jenkins plugin (9.0.0 or prior), migrate to Black Duck Detect Jenkins Plugin 10.0.0 before February 14th, 2025." + Write-Host "*** For more information, please see the plugin release announcement here: https://community.blackduck.com/s/question/0D5Uh00000Mtso3KAB/black-duck-detect-jenkins-plugin-1000-has-been-released" + Write-Host "***" + Write-Host "***" +} + +Write-RebrandingMsg + $ProgressPreference = 'SilentlyContinue' function Get-EnvironmentVariable($Key, $DefaultValue) { if (-not (Test-Path Env:$Key)) { return $DefaultValue; }else { return (Get-ChildItem Env:$Key).Value; } } @@ -124,6 +143,8 @@ function Detect { $DetectArgs = $args; $DetectExitCode = Invoke-Detect -DetectJar $DetectJarFile -DetectArgs $DetectArgs + Write-RebrandingMsg + if ($EnvDetectExitCodePassthru -eq "1") { return $DetectExitCode } else { diff --git a/detect9.sh b/detect9.sh index c30e9b4..73634ea 100755 --- a/detect9.sh +++ b/detect9.sh @@ -1,5 +1,24 @@ #!/bin/bash +write_rebranding_msg() { + echo "***" + echo "***" + echo "*** Warning: Synopsys Detect has been rebranded as Black Duck Detect." + echo "*** Please modify your processes to download Black Duck Detect from https://detect.blackduck.com/detect9.sh before February 14th, 2025, to prevent script and scan execution failure." + echo "*** For more information, please see the domain name change announcement here: https://community.blackduck.com/s/question/0D5Uh00000JsImfKAF/black-duck-detect-scripts-and-the-impact-of-decommissioning-of-detectsynopsyscom" + echo "***" + echo "*** If you are using the Synopsys Detect Azure extension, migrate to the Black Duck Detect Azure extension before February 14th, 2025." + echo "*** For more information, please see the extension release announcement here: https://community.blackduck.com/s/question/0D5Uh00000Mz1AcKAJ/black-duck-detect-azure-devops-ado-plugin-1000-has-been-released" + echo "***" + echo "*** If you are using Synopsys Detect Jenkins plugin (9.0.0 or prior), migrate to Black Duck Detect Jenkins Plugin 10.0.0 before February 14th, 2025." + echo "*** For more information, please see the plugin release announcement here: https://community.blackduck.com/s/question/0D5Uh00000Mtso3KAB/black-duck-detect-jenkins-plugin-1000-has-been-released" + echo "***" + echo "***" + +} + +write_rebranding_msg + get_path_separator() { # Performs a check to see if the system is Windows based. if [[ `uname` == *"NT"* ]] || [[ `uname` == *"UWIN"* ]]; then @@ -226,6 +245,7 @@ run_detect() { eval "${JAVACMD} ${SCRIPT_ARGS}" RESULT=$? + write_rebranding_msg echo "Result code of ${RESULT}, exiting" exit ${RESULT} }