Don't try to close snapshot repos

Change-Id: I4ee927dc4e42cecdc8efa2fa4151ad0a99bf1880
diff --git a/tools/build/onos-buck-publish b/tools/build/onos-buck-publish
index 2b137f8..b1928f8 100755
--- a/tools/build/onos-buck-publish
+++ b/tools/build/onos-buck-publish
@@ -43,5 +43,7 @@
 onos-buck publish --to-maven-central --sign //:top-level-pom
 onos-buck publish --to-maven-central --sign //lib:onos-dependencies-pom
 
-# Close the staging area
-onos-close-staging
+if [ ! grep "maven_url" $ONOS_ROOT/.buckconfig.local | grep -v '#' | grep -q snapshots ]; then
+    # Close the staging area
+    onos-close-staging
+fi