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

Include version number in archive name #190

Merged
merged 1 commit into from
Apr 20, 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
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
working-directory: ${{ github.workspace }}/shell-binaries

- name: Compress
run: Compress-Archive -Path ${{ github.workspace }}/shell-binaries/* composeui_win32.zip
run: Compress-Archive -Path ${{ github.workspace }}/shell-binaries/* composeui-${{ github.ref_name }}-win32.zip

- name: Upload Release Asset
id: upload-release-asset
Expand All @@ -36,7 +36,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./composeui_win32.zip
asset_name: composeui_win32.zip
asset_path: ./composeui-${{ github.ref_name }}-win32.zip
asset_name: composeui-${{ github.ref_name }}-win32.zip
asset_content_type: application/zip

5 changes: 2 additions & 3 deletions src/shell/js/composeui-node-launcher/src/cli/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,17 @@ import unzipper from '@deranged/unzipper';

import pkg from './../../package.json' assert { type: "json" };


const DEFAULT_CDN_URL = 'https://github.com/morganstanley/ComposeUI/releases/download';

let cdnUrl = process.env.npm_config_composeui_cdn_url || process.env.COMPOSEUI_CDN_URL || DEFAULT_CDN_URL;
let downloadedFile = '';

let platform = validatePlatform();
const fileName = `composeui_${platform}.zip`;

const composeui_version = process.env.npm_config_composeui_version || process.env.COMPOSEUI_VERSION || pkg.version;
const skipDownload = process.env.npm_config_composeui_skip_download || process.env.COMPOSEUI_SKIP_DOWNLOAD;

const fileName = `composeui-v${composeui_version}-${platform}.zip`;
let composeuiBinaryFilePath = '';

if (skipDownload === 'true') {
Expand Down Expand Up @@ -53,7 +52,7 @@ function ensureDirectoryExistence(filePath) {
async function downloadFile(dirToLoadTo) {
const tempDownloadedFile = path.resolve(dirToLoadTo, fileName);
downloadedFile = tempDownloadedFile;
const formattedDownloadUrl =`${cdnUrl}/${composeui_version}/${fileName}`;
const formattedDownloadUrl =`${cdnUrl}/v${composeui_version}/${fileName}`;

console.log('Downloading from file: ', formattedDownloadUrl);
console.log('Saving to file:', downloadedFile);
Expand Down