chore: use git commit hash as nextjs build id
This commit is contained in:
parent
dcf7d51046
commit
6ecf9fc7dc
|
|
@ -5,6 +5,9 @@ const { withIpfsGateway } = require("@crossbell/ipfs-gateway-next")
|
|||
const withBundleAnalyzer = require("@next/bundle-analyzer")({
|
||||
enabled: process.env.ANALYZE === "true",
|
||||
})
|
||||
const execSync = require("child_process").execSync
|
||||
|
||||
const lastCommitCommand = "git rev-parse HEAD"
|
||||
|
||||
class UnoCSS {
|
||||
/**
|
||||
|
|
@ -51,5 +54,9 @@ module.exports = withBundleAnalyzer(
|
|||
"default-src 'self'; script-src 'none'; sandbox; style-src 'unsafe-inline';",
|
||||
remotePatterns: [{ hostname: "**" }],
|
||||
},
|
||||
|
||||
async generateBuildId() {
|
||||
return execSync(lastCommitCommand).toString().trim()
|
||||
},
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue