Skip to content

Commit

Permalink
Merge pull request #2456 from demergent-labs/fix_examples_for_release
Browse files Browse the repository at this point in the history
update new examples
  • Loading branch information
lastmjs authored Jan 7, 2025
2 parents adcb856 + 3eeb9c0 commit 67c1d31
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

import { version } from '../../../../../package.json';
import { version } from '../../../../../../../package.json';

function pretest(): void {
execSync(
Expand Down
16 changes: 14 additions & 2 deletions src/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,26 @@ async function handleNewCommand(): Promise<void> {
throw new Error(experimentalMessageCli('the --http-server option'));
}

const templatePath = join(AZLE_PACKAGE_PATH, 'examples', 'hello_world');
const templatePath = join(
AZLE_PACKAGE_PATH,
'examples',
'stable',
'demo',
'hello_world'
);

await runNewCommand(azleVersion, templatePath);
} else {
const projectName =
httpServer === true ? 'hello_world_http_server' : 'hello_world';

const templatePath = join(AZLE_PACKAGE_PATH, 'examples', projectName);
const templatePath = join(
AZLE_PACKAGE_PATH,
'examples',
httpServer === true ? 'experimental' : 'stable',
'demo',
projectName
);

await runNewCommand(azleVersion, templatePath);
}
Expand Down

0 comments on commit 67c1d31

Please sign in to comment.