Remove Intel mac CircleCI configuration (#1409)

Also switch bazel-mac to the arm64 config.
The CircleCI Intel mac config will be turned down soon.
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 31f090e..91074c9 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -7,15 +7,6 @@
   ubuntu:
     docker:
       - image: buildpack-deps:focal
-  mac:
-    environment:
-      EMSDK_NOTTY: "1"
-      # Without this, any `brew install` command will result in self-update of
-      # brew itself which takes more than 4 minutes.
-      HOMEBREW_NO_AUTO_UPDATE: "1"
-    macos:
-      xcode: "12.5.1"
-    resource_class: macos.x86.medium.gen2
   mac_arm64:
     environment:
       EMSDK_NOTTY: "1"
@@ -94,11 +85,6 @@
           name: Install debian packages
           command: sudo apt-get update -q && sudo apt-get install -q cmake build-essential openjdk-8-jre-headless
       - run: test/test.sh
-  test-mac:
-    executor: mac
-    steps:
-      - setup-macos
-      - test-macos
   test-mac-arm64:
     executor: mac_arm64
     steps:
@@ -257,11 +243,10 @@
             apt-get install -q -y bazel
       - run: test/test_bazel.sh
 
-  test-bazel-mac:
-    executor: mac
+  test-bazel-mac-arm64:
+    executor: mac_arm64
     steps:
       - checkout
-      - run: brew install grep
       - run:
           name: install bazelisk
           command: |
@@ -301,9 +286,6 @@
   test-linux-arm64:
     jobs:
       - test-linux-arm64
-  test-mac:
-    jobs:
-      - test-mac
   test-mac-arm64:
     jobs:
       - test-mac-arm64
@@ -328,9 +310,9 @@
   test-bazel-linux:
     jobs:
       - test-bazel-linux
-  test-bazel-mac:
+  test-bazel-mac-arm64:
     jobs:
-      - test-bazel-mac
+      - test-bazel-mac-arm64
   test-bazel-windows:
     jobs:
       - test-bazel-windows
diff --git a/scripts/get_release_info.py b/scripts/get_release_info.py
new file mode 100755
index 0000000..01044ca
--- /dev/null
+++ b/scripts/get_release_info.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python3
+
+import json
+import os
+import sys
+
+def get_latest(tagfile):
+    with open(tagfile) as f:
+        versions = json.load(f)
+        print(versions['aliases']['latest'])
+    return 0
+
+
+def get_hash(tagfile, version):
+    with open(tagfile) as f:
+        versions = json.load(f)
+        print(versions['releases'][version])
+    return 0
+
+
+if __name__ == '__main__':
+    if sys.argv[2] == 'latest':
+        sys.exit(get_latest(sys.argv[1]))
+    if sys.argv[2] == 'hash':
+        sys.exit(get_hash(sys.argv[1], sys.argv[3]))
diff --git a/test/test_bazel.sh b/test/test_bazel.sh
index d8d40e1..51500ac 100755
--- a/test/test_bazel.sh
+++ b/test/test_bazel.sh
@@ -6,13 +6,10 @@
 set -e
 
 # Get the latest version number from emscripten-releases-tag.json.
-VER=$(grep -oP '(?<=latest\": \")([\d\.]+)(?=\")' \
-        emscripten-releases-tags.json \
-      | sed --expression "s/\./\\\./g")
+VER=$(scripts/get_release_info.py emscripten-releases-tags.json latest)
+
 # Based on the latest version number, get the commit hash for that version.
-HASH=$(grep "\"${VER}\"" emscripten-releases-tags.json \
-      | grep -v latest \
-      | cut -f4 -d\")
+HASH=$(scripts/get_release_info.py emscripten-releases-tags.json hash ${VER})
 
 FAILMSG="!!! scripts/update_bazel_workspace.py needs to be run !!!"
 
diff --git a/test/test_bazel_mac.sh b/test/test_bazel_mac.sh
index 4b58b50..fa31103 100755
--- a/test/test_bazel_mac.sh
+++ b/test/test_bazel_mac.sh
@@ -6,13 +6,10 @@
 set -e
 
 # Get the latest version number from emscripten-releases-tag.json.
-VER=$(ggrep -oP '(?<=latest\": \")([\d\.]+)(?=\")' \
-        emscripten-releases-tags.json \
-      | sed "s/\./\\\./g")
+VER=$(scripts/get_release_info.py emscripten-releases-tags.json latest)
+
 # Based on the latest version number, get the commit hash for that version.
-HASH=$(grep "\"${VER}\"" emscripten-releases-tags.json \
-      | grep -v latest \
-      | cut -f4 -d\")
+HASH=$(scripts/get_release_info.py emscripten-releases-tags.json hash ${VER})
 
 FAILMSG="!!! scripts/update_bazel_workspace.py needs to be run !!!"