Please review the Pull request for issue #13. Updating scripts (env_setup.sh) to avoid re-running things that don't need to be re-run.
Modified the file env_setup.sh to check the below two items:
1) If docker image banditpam/cpp:latest already exists, skip the creation of docker image
2) If pre-commit and pre-push hooks already exists, skip the creation of hooks
Modified the file scripts/install-hooks.sh to fix the error in 'sed' command.
Below tests are executed to validate above items
1) Ran the env_setup.sh when docker image does not exists
2) Ran the env_setup.sh when docker image already exists
3) Ran the env_setup.sh when pre-commit and pre-push hooks do not exist
4) Ran the env_setup.sh when pre-commit and pre-push hooks already exist
Modified the file scripts/hook.sh to execute the corresponding test cases on push and commit operations
Please review the Pull request for issue #13. Updating scripts (env_setup.sh) to avoid re-running things that don't need to be re-run.
env_setup.sh
to check the below two items: 1) If docker imagebanditpam/cpp:latest
already exists, skip the creation of docker image 2) If pre-commit and pre-push hooks already exists, skip the creation of hooksscripts/install-hooks.sh
to fix the error in 'sed' command.env_setup.sh
when docker image does not exists 2) Ran theenv_setup.sh
when docker image already exists 3) Ran theenv_setup.sh
whenpre-commit
andpre-push
hooks do not exist 4) Ran theenv_setup.sh
whenpre-commit
andpre-push
hooks already existscripts/hook.sh
to execute the corresponding test cases onpush
andcommit
operations