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

feat: add windows installer #524

Merged
merged 8 commits into from
Apr 25, 2023
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
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