Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion messages/channel.promote.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ also upload xz

# targets

comma-separated targets to promote (e.g.: linux-arm,win32-x64)
comma-separated targets to promote (e.g.: darwin-arm64,win32-x64)

# flags.version.summary

Expand Down
2 changes: 1 addition & 1 deletion src/commands/channel/promote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { CLI, Channel, S3Manifest, VersionShaContents } from '../../types.js';

Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
const messages = Messages.loadMessages('@salesforce/plugin-release-management', 'channel.promote');
const TARGETS = ['linux-x64', 'linux-arm', 'win32-x64', 'win32-x86', 'darwin-x64'];
const TARGETS = ['linux-x64', 'linux-arm64', 'win32-x64', 'win32-arm64', 'darwin-x64', 'darwin-arm64'];

export type PromoteResult = {
dryRun: boolean;
Expand Down
19 changes: 9 additions & 10 deletions src/commands/cli/install/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,15 @@ namespace Method {
class Tarball extends Method.Base {
private s3: AmazonS3;
private paths = {
darwin: ['x64.tar.gz', 'x64.tar.xz'],
darwin: ['x64.tar.gz', 'x64.tar.xz', 'arm64.tar.gz', 'arm64.tar.xz'],
win32: [
'x64.tar.gz',
'x86.tar.gz',
'arm64.tar.gz',
// .xz is not supported by powershell's tar command
// 'x64.tar.xz',
// 'x86.tar.xz'
// 'arm64.tar.xz'
],
linux: ['x64.tar.gz', 'x64.tar.xz'],
'linux-arm': ['arm.tar.gz', 'arm.tar.xz'],
linux: ['x64.tar.gz', 'x64.tar.xz', 'arm64.tar.gz', 'arm64.tar.xz'],
};

public constructor(protected options: Method.Options) {
Expand Down Expand Up @@ -157,7 +156,7 @@ class Tarball extends Method.Base {
}

private getTarballs(platform: Extract<NodeJS.Platform, 'darwin' | 'linux' | 'win32'>): Record<string, string> {
const paths = platform === 'linux' && os.arch().includes('arm') ? this.paths['linux-arm'] : this.paths[platform];
const paths = this.paths[platform];
const s3Tarballs = paths.map(
(p) => `${this.s3.directory}/channels/${this.options.channel}/${this.options.cli}-${platform}-${p}`
);
Expand Down Expand Up @@ -330,14 +329,14 @@ class Installer extends Method.Base {
}

public async win32(): Promise<Results> {
const executables = [`${this.options.cli}-x64.exe`, `${this.options.cli}-x86.exe`];
const executables = [`${this.options.cli}-x64.exe`, `${this.options.cli}-arm64.exe`];
const results: Results = {};
for (const exe of executables) {
const url = `${this.s3.directory}/channels/${this.options.channel}/${exe}`;
const location = path.join(this.options.directory, exe);
// eslint-disable-next-line no-await-in-loop
await download(url, location);
const installLocation = `C:\\install-test\\${this.options.cli}\\${exe.includes('x86') ? 'x86' : 'x64'}`;
const installLocation = `C:\\install-test\\${this.options.cli}\\${exe.includes('arm64') ? 'arm64' : 'x64'}`;
const cmd = `Start-Process -Wait -FilePath "${location}" -ArgumentList "/S", "/D=${installLocation}" -PassThru`;
ux.log(`Installing ${chalk.cyan(exe)} to ${installLocation}...`);
const result = shelljs.exec(cmd, { shell: 'powershell.exe' });
Expand Down Expand Up @@ -375,8 +374,8 @@ class Installer extends Method.Base {
ux.log(`Testing ${chalk.cyan(binaryPath)}`);
const result = shelljs.exec(`cmd /c "${binaryPath}" --version`);
results[cli] =
result.code === 0 && binaryPath.includes('x86')
? result.stdout.includes('win32-x86')
result.code === 0 && binaryPath.includes('arm64')
? result.stdout.includes('win32-arm64')
: result.stdout.includes('win32-x64');
}
return results;
Expand Down
8 changes: 3 additions & 5 deletions src/commands/cli/versions/inspect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,13 @@ const defaultArchives = [
'sf-darwin-x64.tar.xz',
'sf-darwin-arm64.tar.gz',
'sf-darwin-arm64.tar.xz',
'sf-linux-arm.tar.gz',
'sf-linux-arm.tar.xz',
'sf-linux-x64.tar.gz',
'sf-linux-x64.tar.xz',
'sf-linux-arm64.tar.gz',
'sf-linux-arm64.tar.xz',
'sf-win32-x64.tar.gz',
'sf-win32-x64.tar.xz',
'sf-win32-x86.tar.gz',
'sf-win32-x86.tar.xz',
'sf-win32-arm64.tar.xz',
'sf-win32-arm64.tar.gz',
'sf-win32-arm64.tar.xz',
];

Expand Down
Loading