Skip to content

Commit

Permalink
fix tag name
Browse files Browse the repository at this point in the history
  • Loading branch information
apatel369 committed Nov 27, 2024
1 parent 89d71e0 commit b611c8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/create-astro/src/actions/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ export async function getContext(argv: string[]): Promise<Context> {
'--ref': ref,
} = flags;
let projectName = cwd;

const tag = ref === 'next' ? 'beta' : ref;

if (no) {
yes = false;
if (install == undefined) install = false;
Expand All @@ -93,7 +94,7 @@ export async function getContext(argv: string[]): Promise<Context> {
prompt,
packageManager,
username: getName(),
version: getVersion(packageManager, 'astro', process.env.ASTRO_VERSION, ref),
version: getVersion(packageManager, 'astro', process.env.ASTRO_VERSION, tag),
skipHouston,
fancy,
dryRun,
Expand Down
4 changes: 2 additions & 2 deletions packages/create-astro/src/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ export const getName = () =>
});
});

export const getVersion = (packageManager: string, packageName: string, fallback = '', ref = 'latest') =>
export const getVersion = (packageManager: string, packageName: string, fallback = '', tag = 'latest') =>
new Promise<string>(async (resolve) => {
let registry = await getRegistry(packageManager);
const { version } = await fetch(`${registry}/${packageName}/${ref}`, {
const { version } = await fetch(`${registry}/${packageName}/${tag}`, {
redirect: 'follow',
})
.then((res) => res.json())
Expand Down

0 comments on commit b611c8b

Please sign in to comment.