chore: use git commit hash as nextjs build id
This commit is contained in:
@@ -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()
|
||||
},
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user