mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 01:06:00 +08:00
28 lines
497 B
Bash
Executable File
28 lines
497 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
|
|
|
trap "cleanup" ERR
|
|
|
|
setup() {
|
|
cp $dir/.clang-format $dir/..
|
|
cp $dir/build.gradle $dir/..
|
|
cp $dir/settings.gradle $dir/..
|
|
}
|
|
|
|
cleanup() {
|
|
rm $dir/../.clang-format
|
|
rm $dir/../build.gradle
|
|
rm $dir/../settings.gradle
|
|
}
|
|
|
|
# copy Gradle and clang-format config to root
|
|
setup
|
|
|
|
# Execute spotless
|
|
pushd $dir/..
|
|
./formatters/gradlew spotlessApply
|
|
popd
|
|
|
|
# Delete Gradle and clang-format config files in root
|
|
cleanup |