chore: move docs-util to www (#7232)
* reorganize docs apps * add README * fix directory * add condition for old docs * move docs-util to www * remove remaining docs-util * fixes of paths * fix scripts * path fixes * fix github actions * add build packages script
This commit is contained in:
27
www/utils/packages/scripts/get-generate-diff-message.ts
Normal file
27
www/utils/packages/scripts/get-generate-diff-message.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { execSync } from "child_process"
|
||||
import * as core from "@actions/core"
|
||||
|
||||
const command = `git --no-pager diff --minimal --name-only ../../../apps/resources/references`
|
||||
const diffOutput = execSync(command).toString()
|
||||
|
||||
const files = diffOutput.toString().split("\n").filter(Boolean)
|
||||
|
||||
const referenceNames: Set<string> = new Set([])
|
||||
|
||||
files.forEach((file) => {
|
||||
const referenceName = file
|
||||
.replace("www/apps/resources/references/", "")
|
||||
.split("/")[0]
|
||||
|
||||
if (referenceName) {
|
||||
referenceNames.add(referenceName)
|
||||
}
|
||||
})
|
||||
|
||||
let strOutput = "Generated the following references:\n"
|
||||
|
||||
referenceNames.forEach((referenceName) => {
|
||||
strOutput += `- \`${referenceName}\`\n`
|
||||
})
|
||||
|
||||
core.setOutput("body", strOutput)
|
||||
Reference in New Issue
Block a user