Skip to content

Commit 95b8ef7

Browse files
update dist
1 parent c79b084 commit 95b8ef7

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

dist/index.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33268,6 +33268,11 @@ const CLI_VERSION = core.getInput('cli-version');
3326833268
const EXECUTABLE_PATH = core.getInput('executable-path') || path.join(process.env.GITHUB_WORKSPACE, 'bin', 'cloudsmith');
3326933269
const PIP_INSTALL = core.getInput('pip-install') === 'true';
3327033270

33271+
// Define constants for URL construction
33272+
const BASE_URL = 'https://dl.cloudsmith.io/public';
33273+
const NAMESPACE = 'cloudsmith';
33274+
const REPO_NAME = 'cli-zipapp';
33275+
3327133276
// Ensure the executable directory exists
3327233277
fs.mkdirSync(path.dirname(EXECUTABLE_PATH), { recursive: true });
3327333278

@@ -33300,7 +33305,7 @@ function addPathAndCreateBatchScript() {
3330033305
// Download the latest release of the CLI
3330133306
async function downloadLatestRelease() {
3330233307
try {
33303-
const downloadUrl = 'https://dl.cloudsmith.io/public/bart-demo-org/cloudsmith-cli-zipapp/raw/names/cloudsmith-cli/versions/latest/cloudsmith.pyz';
33308+
const downloadUrl = `${BASE_URL}/${NAMESPACE}/${REPO_NAME}/raw/names/cloudsmith-cli/versions/latest/cloudsmith.pyz`;
3330433309
await downloadFile(downloadUrl, EXECUTABLE_PATH);
3330533310
addPathAndCreateBatchScript();
3330633311
} catch (error) {
@@ -33311,7 +33316,7 @@ async function downloadLatestRelease() {
3331133316
// Download a specific release of the CLI by version
3331233317
async function downloadSpecificRelease(version) {
3331333318
try {
33314-
const downloadUrl = `https://dl.cloudsmith.io/public/bart-demo-org/cloudsmith-cli-zipapp/raw/names/cloudsmith-cli/versions/${version}/cloudsmith.pyz`;
33319+
const downloadUrl = `${BASE_URL}/${NAMESPACE}/${REPO_NAME}/raw/names/cloudsmith-cli/versions/${version}/cloudsmith.pyz`;
3331533320
await downloadFile(downloadUrl, EXECUTABLE_PATH);
3331633321
addPathAndCreateBatchScript();
3331733322
} catch (error) {
@@ -33334,7 +33339,7 @@ async function installCli() {
3333433339
try {
3333533340
if (PIP_INSTALL) {
3333633341
await installCliViaPip();
33337-
} else if (CLI_VERSION && CLI_VERSION !== 'none') {
33342+
} else if (CLI_VERSION && CLI_VERSION !== '') {
3333833343
await downloadSpecificRelease(CLI_VERSION);
3333933344
} else {
3334033345
await downloadLatestRelease();

0 commit comments

Comments
 (0)