Skip to content

Instantly share code, notes, and snippets.

@weoses
Last active December 29, 2024 06:58
Show Gist options
  • Select an option

  • Save weoses/c3e2414bf0c1620965fdc720784738c2 to your computer and use it in GitHub Desktop.

Select an option

Save weoses/c3e2414bf0c1620965fdc720784738c2 to your computer and use it in GitHub Desktop.
MongoDB compass arm64 linux build
diff --git a/packages/hadron-build/lib/target.js b/packages/hadron-build/lib/target.js
index 3aea87954..51f3e8cf8 100644
--- a/packages/hadron-build/lib/target.js
+++ b/packages/hadron-build/lib/target.js
@@ -83,6 +83,7 @@ const supportedPlatforms = [
   { platform: 'darwin', arch: 'x64' },
   { platform: 'darwin', arch: 'arm64' },
   { platform: 'linux', arch: 'x64' },
+  { platform: 'linux', arch: 'arm64' },
   { platform: 'win32', arch: 'x64' },
 ];
 
@@ -658,7 +659,13 @@ class Target {
     });
 
     const debianVersion = this.version;
-    const debianArch = this.arch === 'x64' ? 'amd64' : 'i386';
+    const debianArch = (() => {
+             switch(this.arch) {
+                case 'x64': return 'amd64'
+                case 'arm64': return 'arm64'
+                default: return 'i386'
+             }
+          })();
     const debianSection = _.get(platformSettings, 'deb_section');
     this.linux_deb_filename = `${this.slug}_${debianVersion}_${debianArch}.deb`;
     this.linux_tar_filename = `${this.slug}-${this.version}-${this.platform}-${this.arch}.tar.gz`;
@@ -671,7 +678,13 @@ class Target {
       this.semver.patch,
     ].join('.');
     const rhelRevision = this.semver.prerelease.join('.') || '1';
-    const rhelArch = this.arch === 'x64' ? 'x86_64' : 'i386';
+    const rhelArch = (() => {
+             switch(this.arch) {
+                case 'x64': return 'x86_64'
+                case 'arm64': return 'aarch64'
+                default: return 'i386'
+             }
+          })();
     const rhelCategories = _.get(platformSettings, 'rpm_categories');
     this.linux_rpm_filename = `${this.slug}-${this.version}.${rhelArch}.rpm`;
     this.rhel_tar_filename = `${this.slug}-${this.version}-rhel-${this.arch}.tar.gz`;

  • Run export HADRON_DISTRIBUTION=compass
  • Run npm run package-compass
  • Install rpm/deb
@weoses
Copy link
Author

weoses commented Dec 29, 2024

Prebuild version (ea8a5b26166a40a326874bbd1654c4bdee55fd09, compass, dev)
https://drive.google.com/drive/folders/1weXy08cTWvCj5auxrAA9DYkkX8wpIQjN?usp=sharing

(IT IS NOT OFFICIAL BUILD! I DON'T CARE IF YOU GET FIRED CAUSE OF USING THIS)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment