Skip to content

Commit

Permalink
Builds the temp folder to store the handles custom code in differently (
Browse files Browse the repository at this point in the history
#656)

* Builds the temp folder to store the handles custom code in differently
Also fixes a typo in a log message
#654
  • Loading branch information
rfennell authored Mar 31, 2020
1 parent 0310662 commit 6118e65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async function run(): Promise<number> {
// check of redeploy
if (stopOnRedeploy === true) {
if ( util.getDeploymentCount(currentRelease.environments, environmentName) > 1) {
agentApi.logWarn(`Skipping release note generation as this deploy is a re-reployment`);
agentApi.logWarn(`Skipping release note generation as this deploy is a re-deployment`);
resolve(-1);
return promise;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,11 @@ export function processTemplate(
});

var customHandlebarsExtensionFile = "customHandlebarsExtension";
var customHandlebarsExtensionFolder = process.env.Agent_TempDirectory;
// cannot use process.env.Agent_TempDirectory as only set on Windows agent, so build it up from the agent base
// Note that the name is case sensitive on Mac and Linux
var customHandlebarsExtensionFolder = `${process.env.AGENT_WORKFOLDER}/_temp`;
agentApi.logDebug(`Saving custom handles code to file in folder ${customHandlebarsExtensionFolder}`);

if (typeof customHandlebarsExtensionCode !== undefined && customHandlebarsExtensionCode && customHandlebarsExtensionCode.length > 0) {
agentApi.logInfo("Loading custom handlebars extension");
writeFile(`${customHandlebarsExtensionFolder}/${customHandlebarsExtensionFile}.js`, customHandlebarsExtensionCode);
Expand Down

0 comments on commit 6118e65

Please sign in to comment.