Fix path comparison in helmrepo.sh

Change-Id: Ia5c271ab71aaa15b73eb245d7e5de8cf8e996ab9
diff --git a/helmrepo.sh b/helmrepo.sh
index fd59ca6..8c34d57 100755
--- a/helmrepo.sh
+++ b/helmrepo.sh
@@ -46,7 +46,7 @@
 
   while IFS= read -r -d '' chart
   do
-    chartdir=$(dirname "${chart#./}")
+    chartdir=$(dirname "${chart#${WORKSPACE}/}")
     helm package --dependency-update --destination "${NEW_REPO_DIR}" "${chartdir}"
 
   done < <(find "${WORKSPACE}" -name Chart.yaml -print0)
@@ -61,7 +61,7 @@
   # Loop and create chart packages, only if changed
   while IFS= read -r -d '' chart
   do
-    chartdir=$(dirname "${chart#./}")
+    chartdir=$(dirname "${chart#${WORKSPACE}/}")
 
     # See if chart version changed from previous HEAD commit
     chart_yaml_diff=$(git diff -p HEAD^ "${chartdir}/Chart.yaml")