Fix common workflow issues (#61027)
authorAdeel Mujahid <3840695+am11@users.noreply.github.com>
Wed, 10 Nov 2021 19:43:15 +0000 (21:43 +0200)
committerGitHub <noreply@github.com>
Wed, 10 Nov 2021 19:43:15 +0000 (11:43 -0800)
eng/native/build-commons.sh

index 93afd4a..608d06e 100755 (executable)
@@ -48,7 +48,9 @@ check_prereqs()
 
 build_native()
 {
-    eval "$__RepoRootDir/eng/native/version/copy_version_files.sh"
+    if [[ ! -e "$__RepoRootDir/artifacts/obj/_version.c" ]]; then
+        eval "$__RepoRootDir/eng/native/version/copy_version_files.sh"
+    fi
 
     targetOS="$1"
     platformArch="$2"
@@ -257,7 +259,7 @@ while :; do
         break
     fi
 
-    lowerI="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
+    lowerI="$(echo "${1/--/-}" | tr "[:upper:]" "[:lower:]")"
     case "$lowerI" in
         -\?|-h|--help)
             usage