Skip to content

Commit

Permalink
Merge pull request #174 from Worldpay/add-release-scan
Browse files Browse the repository at this point in the history
Added release scan
  • Loading branch information
vjethwaWP authored Mar 31, 2022
2 parents bc8a53d + 2267635 commit 81646fe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ internal class ExpiryDateValidator(private val now: Calendar = Calendar.getInsta
val cal = Calendar.getInstance()

cal.set(Calendar.YEAR, parseInt("${getYearPrefix(now)}$year"))
cal.set(Calendar.DATE, 1)
cal.set(Calendar.MONTH, month - 1)
cal.set(Calendar.DATE, cal.getActualMaximum(Calendar.DATE))

Expand Down
9 changes: 7 additions & 2 deletions scripts/blackduck/run_scan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ echo "Setting version of Detect"
export DETECT_LATEST_RELEASE_VERSION=$BLACKDUCK_DETECT_VERSION

echo "Initiating Blackduck Scan..."

curl -LOk https://detect.synopsys.com/detect.sh
chmod +x ./detect.sh
SDK_VERSION=$(grep 'version=' access-checkout/gradle.properties | cut -d= -f2)
./detect.sh --blackduck.url="https://fis2.app.blackduck.com/" --blackduck.api.token=$hydra_aco_blackduck_token --blackduck.trust.cert=true --detect.project.name=$BLACKDUCK_PROJECT_NAME --detect.project.version.name=$SDK_VERSION --detect.risk.report.pdf=true
if [ $IS_RELEASE_SCAN -eq 0 ]
then
./detect.sh --blackduck.url="https://fis2.app.blackduck.com/" --blackduck.api.token=$hydra_aco_blackduck_token --blackduck.trust.cert=true --detect.project.name=$BLACKDUCK_PROJECT_NAME --detect.project.version.name=$SDK_VERSION --detect.risk.report.pdf=true
else
echo "Executing Release Scan with name $SDK_VERSION-RELEASE"
./detect.sh --blackduck.url="https://fis2.app.blackduck.com/" --blackduck.api.token=$hydra_aco_blackduck_token --blackduck.trust.cert=true --detect.project.name=$BLACKDUCK_PROJECT_NAME --detect.project.version.name="$SDK_VERSION-RELEASE" --detect.risk.report.pdf=true
fi

0 comments on commit 81646fe

Please sign in to comment.