Skip to content

Commit

Permalink
feat: add windows installer (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
Souvikns authored Apr 25, 2023
1 parent 299b9a6 commit aac6ce1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/upload-release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ jobs:
npm_script: pack:tarballs
dist_folder: tar
extension: tar.gz
# - os: windows-latest
# npm_script: pack:windows
# dist_folder: win
# extension: exe
- os: windows-latest
npm_script: pack:windows
dist_folder: win32
extension: x64.exe
- os: windows-latest
npm_script: pack:windows
dist_folder: win32
extension: x86.exe
- os: macos-latest
npm_script: pack:macos
dist_folder: macos
Expand Down
5 changes: 5 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ After downloading the AsyncAPI CLI, install it via the following command:
sudo installer -pkg asyncapi.pkg -target /
```

## Windows
For Windows just install the appropriate installer and simply follow the default installation steps to complete the installation process.

Download [aynscapi.x64.exe](https://github.com/asyncapi/cli/releases/latest/download/asyncapi.x64.exe) for 64-bit Windows and download [asyncapi.x86.exe](https://github.com/asyncapi/cli/releases/latest/download/asyncapi.x86.exe) for 32-bit Windows.

## Linux
Selecting the appropriate AsyncAPI CLI installation method on a Linux operating system depends on your Linux distro.

Expand Down
10 changes: 10 additions & 0 deletions scripts/releasePackagesRename.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ async function renameTar({version, name, sha}) {
await checkAndRenameFile(generatedPath, newPath);
}

async function renameWindows({version, name, sha, arch}) {
const dist = 'dist/win32';

const generatedPath = path.resolve(dist, `${name}-v${version}-${sha}-${arch}.exe`);
const newPath = path.resolve(dist, `asyncapi.${arch}.exe`);
await checkAndRenameFile(generatedPath, newPath);
}

async function renamePkg({version, name, sha, arch}) {
const dist = 'dist/macos';

Expand All @@ -61,6 +69,8 @@ async function renamePackages() {
await renameDeb({version: version.split('-')[0], name, sha});
await renamePkg({version, name, sha, arch: 'x64'});
await renamePkg({version, name, sha, arch: 'arm64'});
await renameWindows({version, name, sha, arch: 'x64'});
await renameWindows({version, name, sha, arch: 'x86'});
await renameTar({version, name, sha});
}

Expand Down

0 comments on commit aac6ce1

Please sign in to comment.