mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-03-06 16:38:46 +01:00
* Move parameters listing from GenerateManifests to GetAppDetails * Fix logging to use standard logger to honor CLI loglevel
20 lines
457 B
Bash
Executable File
20 lines
457 B
Bash
Executable File
#! /bin/sh
|
|
set -eu
|
|
|
|
CHANGED_GO_FILES=""
|
|
for file in $(git diff --name-only | grep ".go$" || true); do
|
|
if [[ -f ${file} ]] ; then
|
|
CHANGED_GO_FILES="${CHANGED_GO_FILES} ${file}"
|
|
fi
|
|
done
|
|
|
|
if [[ "${CHANGED_GO_FILES}" != "" ]]; then
|
|
echo "Formatting imports"
|
|
goimports -w -local github.com/argoproj/argo-cd ${CHANGED_GO_FILES} ;
|
|
|
|
echo "Formatting code"
|
|
gofmt -w ${CHANGED_GO_FILES} ;
|
|
else
|
|
echo "No changed files to format"
|
|
fi
|