asherah 1.0.58 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ ASHERAH_VERSION=v0.4.7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asherah",
3
- "version": "1.0.58",
3
+ "version": "1.1.1",
4
4
  "description": "Asherah envelope encryption and key rotation library",
5
5
  "main": "dist/asherah.js",
6
6
  "repository": {
@@ -22,7 +22,8 @@
22
22
  "dist/asherah.d.ts",
23
23
  "scripts/download-binaries.sh",
24
24
  "SHA256SUMS",
25
- "SHA256SUMS-darwin"
25
+ "SHA256SUMS-darwin",
26
+ ".asherah-version"
26
27
  ],
27
28
  "devDependencies": {
28
29
  "@types/benchmark": "^2.1.1",
@@ -14,30 +14,34 @@ MACHINE=$(uname -m)
14
14
  if [[ "${OS}" == 'Linux' ]]; then
15
15
  if [[ ${MACHINE} == 'x86_64' ]]; then
16
16
  echo "Linux x64"
17
- curl -s -L --fail -O --retry 999 --retry-max-time 0 https://github.com/godaddy/asherah-cobhan/releases/download/${ASHERAH_VERSION}/libasherah-x64.so
18
- shasum -a 256 --ignore-missing -c ../SHA256SUMS || (echo 'SHA256 mismatch!' ; rm -f ./*.so ; exit 1)
17
+ FILENAME=libasherah-x64.so
18
+ SUMS=../SHA256SUMS
19
19
  elif [[ ${MACHINE} == 'aarch64' ]]; then
20
20
  echo "Linux arm64"
21
- curl -s -L --fail -O --retry 999 --retry-max-time 0 https://github.com/godaddy/asherah-cobhan/releases/download/${ASHERAH_VERSION}/libasherah-arm64.so
22
- shasum -a 256 --ignore-missing -c ../SHA256SUMS || (echo 'SHA256 mismatch!' ; rm -f ./*.so ; exit 1)
21
+ FILENAME=libasherah-arm64.so
22
+ SUMS=../SHA256SUMS
23
23
  else
24
- echo "Unknown CPU architecture"
24
+ echo "Unsupported CPU architecture"
25
25
  exit 1
26
26
  fi
27
27
  elif [[ ${OS} == 'Darwin' ]]; then
28
28
  if [[ ${MACHINE} == 'x86_64' ]]; then
29
29
  echo "MacOS x64"
30
- curl -s -L --fail -O --retry 999 --retry-max-time 0 https://github.com/godaddy/asherah-cobhan/releases/download/${ASHERAH_VERSION}/libasherah-x64.dylib
31
- shasum -a 256 --ignore-missing -c ../SHA256SUMS-darwin || (echo 'SHA256 mismatch!' ; rm -f ./*.dylib ; exit 1)
30
+ FILENAME=libasherah-x64.dylib
31
+ SUMS=../SHA256SUMS-darwin
32
32
  elif [[ ${MACHINE} == 'arm64' ]]; then
33
33
  echo "MacOS arm64"
34
- curl -s -L --fail -O --retry 999 --retry-max-time 0 https://github.com/godaddy/asherah-cobhan/releases/download/${ASHERAH_VERSION}/libasherah-arm64.dylib
35
- shasum -a 256 --ignore-missing -c ../SHA256SUMS-darwin || (echo 'SHA256 mismatch!' ; rm -f ./*.dylib ; exit 1)
34
+ FILENAME=libasherah-arm64.dylib
35
+ SUMS=../SHA256SUMS-darwin
36
36
  else
37
- echo "Unknown CPU architecture"
37
+ echo "Unsupported CPU architecture"
38
38
  exit 1
39
39
  fi
40
40
  else
41
- echo "Unknown operating system"
41
+ echo "Unsupported operating system"
42
42
  exit 1
43
43
  fi
44
+
45
+ curl -s -L --fail -O --retry 999 --retry-max-time 0 "https://github.com/godaddy/asherah-cobhan/releases/download/${ASHERAH_VERSION}/${FILENAME}"
46
+ grep "${FILENAME}" "${SUMS}" > ./SHA256SUM
47
+ shasum -a 256 -c ./SHA256SUM || (echo 'SHA256 mismatch!' ; rm -f ./*.so ./*.dylib ; exit 1)