* 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
28 lines
714 B
TypeScript
28 lines
714 B
TypeScript
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)
|