Anchor rsync targets with dot, last attempt copied into rsync/rsync

Change-Id: Ie492f9b5d1d515be20dd4e20a99bf3ca07a94555
diff --git a/jjb/shell/github-release.sh b/jjb/shell/github-release.sh
index a3d60fb..d64b8aa 100644
--- a/jjb/shell/github-release.sh
+++ b/jjb/shell/github-release.sh
@@ -40,6 +40,17 @@
 common_args+=('--stacktrace')
 # common_args+=('--tempdir')
 
+# -----------------------------------------------------------------------
+# Jenkins must have checked out/copied the script -vs- repository
+# -----------------------------------------------------------------------
+# 17:56:27 [github-release_voltctl] $ /usr/bin/env bash /tmp/jenkins1043949650153731384.sh
+# 17:56:27 ** /tmp/jenkins1043949650153731384.sh: PWD=/w/workspace/github-release_voltctl
+# 17:56:27   5120009      4 drwxrwxr-x   4 jenkins  jenkins      4096 Jan 25 22:56 .
+# 17:56:27   5120010      4 drwxrwxr-x   9 jenkins  jenkins      4096 Jan 25 22:56 ./voltctl
+# 17:56:27   5120036      4 drwxrwxr-x   2 jenkins  jenkins      4096 Jan 25 22:56 ./voltctl@tmp
+# 17:56:27 /tmp/jenkins1043949650153731384.sh: line 44: /tmp/common/common.sh: No such file or directory
+# -----------------------------------------------------------------------
+
 # shellcheck disable=SC1091
 source "${pgmdir}/common/common.sh" "${common_args[@]}"
 
@@ -110,8 +121,8 @@
     # Copy artifacts into the release temp dir
     # shellcheck disable=SC2086
     # cp -v "$ARTIFACT_GLOB" "$RELEASE_TEMP"
-    echo "rsync -rv --checksum \"$artifact_glob\" \"$RELEASE_TEMP/.\""
-    rsync -rv --checksum "$artifact_glob" "$RELEASE_TEMP/."
+    echo "rsync -rv --checksum \"$artifact_glob/.\" \"$RELEASE_TEMP/.\""
+    rsync -rv --checksum "$artifact_glob/." "$RELEASE_TEMP/."
     
     echo
     echo "** ${FUNCNAME[0]}: RELEASE_TEMP=${RELEASE_TEMP}"
@@ -208,8 +219,8 @@
 
   # Are we failing on a literal string "release/*" ?
   # cp -v "$ARTIFACT_GLOB" "$RELEASE_TEMP"
-  # echo "rsync -rv --checksum \"$ARTIFACT_GLOB\" \"$RELEASE_TEMP/.\""
-  # rsync -rv --checksum "$ARTIFACT_GLOB" "$RELEASE_TEMP/."
+  # echo "rsync -rv --checksum \"$artifact_glob/.\" \"$RELEASE_TEMP/.\""
+  # rsync -rv --checksum "$artifact_glob/." "$RELEASE_TEMP/."
 
   echo
   echo "RELEASE_TEMP(${RELEASE_TEMP}) contains:"
@@ -227,6 +238,9 @@
   # handle release files
   pushd "$RELEASE_TEMP"
 
+    ## [TODO] Add a content check, err when only source tarballs exist
+    find . -mindepth 1 -maxdepth 1 ! -type d -ls
+
     # Generate and check checksums
     sha256sum -- * > checksum.SHA256
     sha256sum -c < checksum.SHA256
@@ -245,7 +259,6 @@
         --name "$rel_file" \
         --file "$rel_file"
     done
-    set +x
   popd
 
   popd