mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
build(nuxt): use latest nitropack-edge
on release (#7036)
This commit is contained in:
parent
c4b5013874
commit
ec7e54c835
@ -1,5 +1,6 @@
|
|||||||
import { promises as fsp } from 'node:fs'
|
import { promises as fsp } from 'node:fs'
|
||||||
import { execSync } from 'node:child_process'
|
import { execSync } from 'node:child_process'
|
||||||
|
import { $fetch } from 'ohmyfetch'
|
||||||
import { resolve } from 'pathe'
|
import { resolve } from 'pathe'
|
||||||
import { globby } from 'globby'
|
import { globby } from 'globby'
|
||||||
|
|
||||||
@ -100,6 +101,11 @@ async function main () {
|
|||||||
const commit = execSync('git rev-parse --short HEAD').toString('utf-8').trim()
|
const commit = execSync('git rev-parse --short HEAD').toString('utf-8').trim()
|
||||||
const date = Math.round(Date.now() / (1000 * 60))
|
const date = Math.round(Date.now() / (1000 * 60))
|
||||||
|
|
||||||
|
const nuxtPkg = workspace.find('nuxt')
|
||||||
|
const nitroInfo = await $fetch('https://registry.npmjs.org/nitropack-edge')
|
||||||
|
const latestNitro = nitroInfo['dist-tags'].latest
|
||||||
|
nuxtPkg.data.dependencies.nitropack = `npm:nitropack-edge@^${latestNitro}`
|
||||||
|
|
||||||
for (const pkg of workspace.packages.filter(p => !p.data.private)) {
|
for (const pkg of workspace.packages.filter(p => !p.data.private)) {
|
||||||
workspace.setVersion(pkg.data.name, `${pkg.data.version}-${date}.${commit}`)
|
workspace.setVersion(pkg.data.name, `${pkg.data.version}-${date}.${commit}`)
|
||||||
const newname = pkg.data.name === 'nuxt' ? 'nuxt3' : (pkg.data.name + '-edge')
|
const newname = pkg.data.name === 'nuxt' ? 'nuxt3' : (pkg.data.name + '-edge')
|
||||||
|
Loading…
Reference in New Issue
Block a user