Skip to content

Commit

Permalink
Merge pull request #37 from ankitkumarr/ankikuma-fix-sitename
Browse files Browse the repository at this point in the history
Change sitepackage.txt to packageversion.txt (fixes #36)
  • Loading branch information
JennyLawrance authored May 17, 2019
2 parents 78d92d1 + 2f2a656 commit ae0574e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion Common/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ public static TimeSpan MaxAllowedExecutionTime
public const string DurableTask = "durableTask";
public const string Extensions = "extensions";
public const string SitePackages = "SitePackages";
public const string SiteVersionTxt = "siteversion.txt";
public const string PackageNameTxt = "packagename.txt";
public const string KuduBuild = "1.0.0.6";
}
Expand Down
2 changes: 1 addition & 1 deletion Kudu.Core/Deployment/DeploymentManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ await PostDeploymentHelper.SyncFunctionsTriggers(

if (_settings.RunFromLocalZip() && deploymentInfo is ZipDeploymentInfo)
{
await PostDeploymentHelper.UpdateSiteVersion(deploymentInfo as ZipDeploymentInfo, _environment, logger);
await PostDeploymentHelper.UpdatePackageName(deploymentInfo as ZipDeploymentInfo, _environment, logger);
}

FinishDeployment(id, deployStep);
Expand Down
8 changes: 4 additions & 4 deletions Kudu.Core/Helpers/PostDeploymentHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -699,11 +699,11 @@ private static void Trace(TraceEventType eventType, string format, params object
}
}

public static async Task UpdateSiteVersion(ZipDeploymentInfo deploymentInfo, IEnvironment environment, ILogger logger)
public static async Task UpdatePackageName(ZipDeploymentInfo deploymentInfo, IEnvironment environment, ILogger logger)
{
var siteVersionPath = Path.Combine(environment.SitePackagesPath, Constants.SiteVersionTxt);
logger.Log($"Updating {siteVersionPath} with deployment {deploymentInfo.ZipName}");
await FileSystemHelpers.WriteAllTextToFileAsync(siteVersionPath, deploymentInfo.ZipName);
var packageNamePath = Path.Combine(environment.SitePackagesPath, Constants.PackageNameTxt);
logger.Log($"Updating {packageNamePath} with deployment {deploymentInfo.ZipName}");
await FileSystemHelpers.WriteAllTextToFileAsync(packageNamePath, deploymentInfo.ZipName);
}
}
}

0 comments on commit ae0574e

Please sign in to comment.