2021-07-30 09:59:12 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-12-16 08:17:29 +00:00
|
|
|
# reading os type from arguments
|
|
|
|
CURRENT_OS=$1
|
|
|
|
|
2023-03-05 20:27:55 +00:00
|
|
|
if [ "${CURRENT_OS}" == "windows-latest-8-cores" ];then
|
2021-12-16 08:17:29 +00:00
|
|
|
extension=.exe
|
|
|
|
fi
|
|
|
|
|
2021-12-14 16:13:53 +00:00
|
|
|
echo "::group::Building functional-test binary"
|
2021-12-16 08:17:29 +00:00
|
|
|
go build -o functional-test$extension
|
2021-12-14 16:13:53 +00:00
|
|
|
echo "::endgroup::"
|
2021-08-02 06:10:44 +00:00
|
|
|
|
2021-12-14 16:13:53 +00:00
|
|
|
echo "::group::Building Nuclei binary from current branch"
|
2021-12-16 08:17:29 +00:00
|
|
|
go build -o nuclei_dev$extension ../nuclei
|
2021-12-14 16:13:53 +00:00
|
|
|
echo "::endgroup::"
|
2021-08-02 06:10:44 +00:00
|
|
|
|
2022-03-03 13:40:03 +00:00
|
|
|
echo "::group::Installing nuclei templates"
|
2022-03-03 14:21:16 +00:00
|
|
|
./nuclei_dev$extension -update-templates
|
2022-03-03 13:40:03 +00:00
|
|
|
echo "::endgroup::"
|
|
|
|
|
2021-12-16 08:17:29 +00:00
|
|
|
echo "::group::Building latest release of nuclei"
|
|
|
|
go build -o nuclei$extension -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei
|
2021-12-14 16:13:53 +00:00
|
|
|
echo "::endgroup::"
|
2021-08-02 06:10:44 +00:00
|
|
|
|
|
|
|
echo 'Starting Nuclei functional test'
|
2021-12-16 08:17:29 +00:00
|
|
|
./functional-test$extension -main ./nuclei$extension -dev ./nuclei_dev$extension -testcases testcases.txt
|