Allow publishing of RC builds

Change-Id: I5be1e7ee685cbf9f47c2491431c3899c55243eb2
diff --git a/tools/build/onos-upload-docs b/tools/build/onos-upload-docs
index 5c311a3..ed9c0f5 100755
--- a/tools/build/onos-upload-docs
+++ b/tools/build/onos-upload-docs
@@ -14,8 +14,8 @@
 docs=$(onos-buck build //docs:external --show-output 2>/dev/null | tail -1 | cut -d\  -f2)
 
 ONOS_VERSION_STRING=$ONOS_VERSION
-if echo $ONOS_VERSION_STRING | grep '-'; then
-    echo "ONOS version $ONOS_VERSION_STRING is a beta or RC. Skipping"
+if echo $ONOS_VERSION_STRING | grep '-b'; then
+    echo "ONOS version $ONOS_VERSION_STRING is a beta. Skipping"
     exit 0
 fi
 
@@ -32,6 +32,11 @@
     replace="0"
 fi
 
+if echo $ONOS_VERSION_STRING | grep '-'; then
+    echo "ONOS version $ONOS_VERSION_STRING is a beta or RC. Not replacing default document set."
+    replace="0"
+fi
+
 scp $docs $remote:/tmp/onos-apidocs-$ONOS_VERSION.tar.gz
 ssh $remote "
     mkdir -p /var/www/api/$ONOS_VERSION