Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add platform dependant suffix to the available piper binaries #204

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,29 @@ async function getPiperDownloadURL (piper: string, version?: string): Promise<st
}

async function getPiperBinaryNameFromInputs (isEnterpriseStep: boolean, version?: string): Promise<string> {
let piper = 'piper'
let piper = 'piper'
if (isEnterpriseStep) {
piper = 'sap-piper'
}
}
if (version === 'master') {
info('using _master binaries is deprecated. Using latest release version instead.')
}
// Determine the running platform - only the available precompiled binaries in GitHub
switch (process.platform) {
case 'linux', 'freebsd', 'openbsd':
// Default Piper executable. Do nothing - for reference only
break
case 'darwin':
if (process.arch === 'arm64')
piper += '-darwin.arm64'
if (process.arch === 'x64' || process.arch === 'ia32')
piper += '-darwin.x86_64'
break
case 'win32':
// Windows binary not available yet
break
}

return piper
}

Expand Down