Skip to content

Commit d59670c

Browse files
traskgithub-actions[bot]
authored andcommitted
Make script run locally better
1 parent c771b94 commit d59670c

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/scripts/build-azure-monitor-dependency.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ echo "Installed version: $INSTALLED_VERSION"
3232
# Clean up
3333
echo "Cleaning up..."
3434
cd ..
35-
rm -rf azure-sdk-temp
35+
if [ -n "$CI" ]; then
36+
rm -rf azure-sdk-temp
37+
fi
3638

3739
# Update dependency versions in the current project
3840
echo "Updating dependency versions in project files..."
@@ -52,10 +54,11 @@ fi
5254
./gradlew resolveAndLockAll --write-locks
5355
./gradlew generateLicenseReport --no-build-cache
5456

55-
# this is needed to make license report pass
56-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
57-
git config user.name "github-actions[bot]"
58-
git commit -a -m "update azure-monitor-opentelemetry-autoconfigure dependency to $INSTALLED_VERSION"
57+
if [ -n "$CI" ]; then
58+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
59+
git config user.name "github-actions[bot]"
60+
git commit -a -m "update azure-monitor-opentelemetry-autoconfigure dependency to $INSTALLED_VERSION"
61+
fi
5962

6063
echo "azure-monitor-opentelemetry-autoconfigure dependency build completed successfully"
6164
echo "All project files updated to use version: $INSTALLED_VERSION"

0 commit comments

Comments
 (0)