Tucker McKnight <tucker@pangolin.lan> | Tue Dec 30 2025
rename 'artifactSteps' to 'buildSteps'
82 83 84 85 86 87
await exec(`git clone ${originalLocation} ${eleventyConfig.dir.output + reposPath + "/" + gitRepoName} --bare`)
await exec(`git -C ${eleventyConfig.dir.output + reposPath + "/" + gitRepoName} update-server-info`)
}
if (typeof repoConfig.artifactSteps !== 'undefined') {
// make a temp directory for things to run in
const tempDirName = `temp_${Math.floor(Math.random() * 10000).toString()}`
const tempDir = `${directories.output}${reposPath}${tempDirName}`82 83 84 85 86 87
await exec(`git clone ${originalLocation} ${eleventyConfig.dir.output + reposPath + "/" + gitRepoName} --bare`)
await exec(`git -C ${eleventyConfig.dir.output + reposPath + "/" + gitRepoName} update-server-info`)
}
if (typeof repoConfig.buildSteps !== 'undefined') {
// make a temp directory for things to run in
const tempDirName = `temp_${Math.floor(Math.random() * 10000).toString()}`
const tempDir = `${directories.output}${reposPath}${tempDirName}`91 92 93 94 95 96 97 98 99 100
await exec(`git clone -s ${directories.output}${eleventyConfig.getFilter("slugify")(repoName)}.git ${tempDirRepoPath}`)
for (let branch of repoConfig.branchesToPull) {
await exec(`git -C ${tempDirRepoPath} checkout ${branch}`)
for (let artifactStep of repoConfig.artifactSteps) {
// Run the command for each step in each branch
await exec(`(cd ${tempDirRepoPath} && ${artifactStep.command})`)
// Copy the specified folders from the "from" to the "to" dir
await exec(`cp -r ${tempDirRepoPath}/${artifactStep.copyFrom} ${directories.output}${eleventyConfig.getFilter("slugify")(repoName)}/branches/${eleventyConfig.getFilter("slugify")(branch)}/${artifactStep.copyTo}`)
}
}
// delete the temp dirs91 92 93 94 95 96 97 98 99 100
await exec(`git clone -s ${directories.output}${eleventyConfig.getFilter("slugify")(repoName)}.git ${tempDirRepoPath}`)
for (let branch of repoConfig.branchesToPull) {
await exec(`git -C ${tempDirRepoPath} checkout ${branch}`)
for (let buildStep of repoConfig.buildSteps) {
// Run the command for each step in each branch
await exec(`(cd ${tempDirRepoPath} && ${buildStep.command})`)
// Copy the specified folders from the "from" to the "to" dir
await exec(`cp -r ${tempDirRepoPath}/${buildStep.copyFrom} ${directories.output}${eleventyConfig.getFilter("slugify")(repoName)}/branches/${eleventyConfig.getFilter("slugify")(branch)}/${buildStep.copyTo}`)
}
}
// delete the temp dirs57 58 59 60 61 62
languageExtensions?: {
[fileExtension: string]: string
},
artifactSteps?: {
command: string,
copyFrom: string,
copyTo: string,57 58 59 60 61 62
languageExtensions?: {
[fileExtension: string]: string
},
buildSteps?:
command: string,
copyFrom: string,
copyTo: string,