Skip to content

Commit

Permalink
fix(core): support ARM 64-bit environments
Browse files Browse the repository at this point in the history
fix(core): support ARM 64-bit environments
  • Loading branch information
paambaati authored Apr 21, 2023
2 parents 0a6ab7b + 0a8b271 commit ea13673
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { platform } from 'os';
import { platform, arch } from 'os';
import { chdir } from 'process';
import { unlinkSync } from 'fs';
import { debug, error, setFailed, warning, info } from '@actions/core';
Expand All @@ -13,8 +13,11 @@ import {
} from './utils';
import type { ExecOptions } from '@actions/exec/lib/interfaces';

// REFER: https://docs.codeclimate.com/docs/configuring-test-coverage#locations-of-pre-built-binaries
/** Canonical download URL for the official CodeClimate reporter. */
export const DOWNLOAD_URL = `https://codeclimate.com/downloads/test-reporter/test-reporter-latest-${platform()}-amd64`;
export const DOWNLOAD_URL = `https://codeclimate.com/downloads/test-reporter/test-reporter-latest-${platform()}-${
arch() === 'arm64' ? 'arm64' : 'amd64'
}`;
/** Local file name of the CodeClimate reporter. */
export const EXECUTABLE = './cc-reporter';
export const CODECLIMATE_GPG_PUBLIC_KEY_ID =
Expand Down

0 comments on commit ea13673

Please sign in to comment.