Przeglądaj źródła

CRLF endings on Windows and shasum bugfixes

Peter Squicciarini 6 lat temu
rodzic
commit
1db9cfba3f
2 zmienionych plików z 6 dodań i 4 usunięć
  1. 4 4
      sum.sh
  2. 2 0
      update_version.sh

+ 4 - 4
sum.sh

@@ -9,11 +9,11 @@ fi
 sum_file () {
   if [[ -f "$1" ]]; then
     if [[ "$CI_WINDOWS" == "True" ]]; then
-      checksum -a sha256 $1 > $1.sha256
-      checksum -a sha1 $1 > $1.sha1
+      checksum -a sha256 "$1" > "$1".sha256
+      checksum -a sha1 "$1" > "$1".sha1
     else
-      shasum -a 256 $1 > $1.sha256
-      shasum $1 > $1.sha1
+      shasum -a 256 "$1" > "$1".sha256
+      shasum "$1" > "$1".sha1
     fi
   fi
 }

+ 2 - 0
update_version.sh

@@ -30,6 +30,8 @@ URL_BASE=https://github.com/VSCodium/vscodium/releases/download/${LATEST_MS_TAG}
 if [[ "$CI_WINDOWS" == "True" ]]; then
   # BUILD_REPOSITORY_URI = e.g. https://github.com/VSCodium/vscodium
   VERSIONS_REPO=$(echo ${BUILD_REPOSITORY_URI} | awk -F"/" '{ print $4 }')/versions
+
+  git config --global core.autocrlf true
 else
   # TRAVIS_REPO_SLUG = e.g. VSCodium/vscodium
   VERSIONS_REPO=$(echo ${TRAVIS_REPO_SLUG} | awk -F"/" '{ print $1 }')/versions