Skip to content

Commit 4e73f01

Browse files
committed
Working sideload build of the msdo actions-toolkit
1 parent da76342 commit 4e73f01

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gulpfile.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function sideload(cb) {
2929
throw new Error(`The node_modules directory for the toolkit does not exist. please run npm install before continuing: ${toolkitNodeModulesDir}`);
3030
}
3131

32-
if (process.env.SECURITY_DEVOPS_ACTION_BUILD_SIDELOAD_BUILD === 'true') {
32+
if (process.env.SECURITY_DEVOPS_ACTION_BUILD_SIDELOAD_BUILD !== 'false') {
3333
console.log('Building sideload project: npm run build');
3434
const output = execSync('npm run build', { cwd: toolkitSrcDir, encoding: 'utf8' });
3535
console.log(output);
@@ -38,8 +38,10 @@ function sideload(cb) {
3838
console.log(`Clearing the existing toolkit directory: ${toolkitNodeModulesDir}`);
3939
clearDir(toolkitNodeModulesDir);
4040

41+
const toolkitDistDir = path.join(toolkitSrcDir, 'dist');
42+
4143
console.log("Copying sideload build...");
42-
copyFiles(toolkitSrcDir, toolkitNodeModulesDir);
44+
copyFiles(toolkitDistDir, toolkitNodeModulesDir);
4345

4446
fs.writeFileSync(
4547
path.join(toolkitNodeModulesDir, '.sideloaded'),

0 commit comments

Comments
 (0)