diff options
| author | Nick <[email protected]> | 2019-09-13 11:03:24 -0400 |
|---|---|---|
| committer | Nick <[email protected]> | 2019-09-13 11:03:24 -0400 |
| commit | 50b081827365da913c07917afdd8867894d6ad75 (patch) | |
| tree | a939bff00343bb0f2a0988d9ab4de78f5e7b8ff2 /Jenkinsfile | |
| parent | e70fdaa33f694be7241833e8d5a161b432972dcb (diff) | |
try conditional check in bash
Diffstat (limited to 'Jenkinsfile')
| -rw-r--r-- | Jenkinsfile | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Jenkinsfile b/Jenkinsfile index e3ae91e..714ca41 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,7 +13,10 @@ pipeline { source /home/tgrogers-raid/a/common/gpgpu-sim-setup/common/export_gcc_version.sh 5.3.0 git remote add upstream https://github.com/purdue-aalp/gpgpu-sim_distribution git fetch upstream - git diff --name-only upstream/dev | grep -E "*.cc|*.h|*.cpp|*.hpp" | xargs ./run-clang-format.py --clang-format-executable /tmp/clang-format + cpp_diff= $(git diff --name-only upstream/dev | grep -E "*.cc|*.h|*.cpp|*.hpp") + if [[ $cpp_diff ]]; then + git diff --name-only upstream/dev | grep -E "*.cc|*.h|*.cpp|*.hpp" | xargs ./run-clang-format.py --clang-format-executable /tmp/clang-format + fi ''' } } |
