Skip to content

Commit

Permalink
Fix NPM fleetctl with new release archive formats (#1238)
Browse files Browse the repository at this point in the history
- Wrap extracted archives in directory.
- Adjust naming of archives and directories.
  • Loading branch information
zwass committed Jun 28, 2021
1 parent d6d5840 commit df2c45f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions .goreleaser.yml
Expand Up @@ -57,27 +57,30 @@ archives:
builds:
- fleet
- fleetctl
name_template: fleet_{{.Version}}_{{.Os}}
name_template: fleet_v{{.Version}}_{{.Os}}
replacements:
darwin: macos
format_overrides:
- goos: windows
format: zip
wrap_in_directory: true

- id: fleetctl
builds:
- fleetctl
name_template: fleetctl_{{.Version}}_{{.Os}}
name_template: fleetctl_v{{.Version}}_{{.Os}}
replacements:
darwin: macos
wrap_in_directory: true

- id: fleetctl-zip
builds:
- fleetctl
name_template: fleetctl_{{.Version}}_{{.Os}}
name_template: fleetctl_v{{.Version}}_{{.Os}}
format: zip
replacements:
darwin: macos
wrap_in_directory: true

dockers:
- goos: linux
Expand Down
2 changes: 1 addition & 1 deletion tools/fleetctl-npm/package.json
@@ -1,6 +1,6 @@
{
"name": "fleetctl",
"version": "v4.0.0-rc3",
"version": "v4.0.0-rc3-1",
"description": "Installer for the fleetctl CLI tool",
"bin": {
"fleetctl": "./run.js"
Expand Down
2 changes: 1 addition & 1 deletion tools/fleetctl-npm/run.js
Expand Up @@ -19,7 +19,7 @@ const strippedVersion = version.replace(/-[0-9]+/i, "");
const binDir = path.join(__dirname, "install");
// Determine the install directory by version so that we can detect when we need
// to upgrade to a new version.
const installDir = path.join(binDir, version);
const installDir = path.join(binDir, strippedVersion);

const platform = () => {
switch (os.type()) {
Expand Down

0 comments on commit df2c45f

Please sign in to comment.