Skip to content

Commit

Permalink
Merge branch 'canary' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
AlmazHecker committed Mar 5, 2024
2 parents f78198d + 135642b commit 98e627f
Show file tree
Hide file tree
Showing 404 changed files with 1,987 additions and 9,454 deletions.
26 changes: 13 additions & 13 deletions .github/actions/next-stats-action/src/prepare/repo-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ module.exports = (actionInfo) => {
`git clone ${actionInfo.gitRoot}${repoPath} --single-branch --branch ${branch} --depth=${depth} ${dest}`
)
},
async getLastStable(repoDir = '') {
const { stdout } = await exec(`cd ${repoDir} && git describe`)
const tag = stdout.trim()
async getLastStable() {
const res = await fetch(
`https://api.github.com/repos/vercel/next.js/releases/latest`,
{
headers: {
'X-GitHub-Api-Version': '2022-11-28',
},
}
)

if (!tag || !tag.startsWith('v')) {
throw new Error(`Failed to get tag info: "${stdout}"`)
}
const [major, minor, patch] = tag.split('-canary')[0].split('.')
if (!major || !minor || !patch) {
if (!res.ok) {
throw new Error(
`Failed to split tag into major/minor/patch: "${stdout}"`
`Failed to get latest stable tag ${res.status}: ${await res.text()}`
)
}
// last stable tag will always be 1 patch less than canary
return `${major}.${minor}.${
Number(patch) - tag.includes('-canary') ? 1 : 0
}`
const data = await res.json()
return data.tag_name
},
async getCommitId(repoDir = '') {
const { stdout } = await exec(`cd ${repoDir} && git rev-parse HEAD`)
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/trigger_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ jobs:
node-version: 18
check-latest: true

- run: git clone https://github.com/vercel/next.js.git --depth=25 .
- uses: actions/checkout@v4
with:
fetch-depth: 25

- name: Get commit of the latest tag
run: echo "LATEST_TAG_COMMIT=$(git rev-list -n 1 $(git describe --tags --abbrev=0))" >> $GITHUB_ENV
Expand Down
72 changes: 37 additions & 35 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ swc_core = { version = "0.90.12", features = [
testing = { version = "0.35.19" }

# Turbo crates
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240304.1" }
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240304.2" }
# [TODO]: need to refactor embed_directory! macro usages, as well as resolving turbo_tasks::function, macros..
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240304.1" }
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240304.2" }
# [TODO]: need to refactor embed_directory! macro usage in next-core
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240304.1" }
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240304.2" }

# General Deps

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export default async function sitemap({ id }) {
`SELECT id, date FROM products WHERE id BETWEEN ${start} AND ${end}`
)
return products.map((product) => ({
url: `${BASE_URL}/product/${id}`
url: `${BASE_URL}/product/${id}`,
lastModified: product.date,
}))
}
Expand Down

0 comments on commit 98e627f

Please sign in to comment.