private async Task <string> GetUploadPathAsync(string preferredContentFormat, AgentTaskPluginExecutionContext context, string path, CancellationToken cancellationToken) { string uploadPath = path; if (string.Equals(preferredContentFormat, ContentFormatConstants.SingleTar, StringComparison.OrdinalIgnoreCase)) { uploadPath = await TarUtils.ArchiveFilesToTarAsync(context, path, cancellationToken); } return(uploadPath); }
private async Task <string> GetUploadPathAsync(ContentFormat contentFormat, AgentTaskPluginExecutionContext context, string path, CancellationToken cancellationToken) { string uploadPath = path; if (contentFormat == ContentFormat.SingleTar) { uploadPath = await TarUtils.ArchiveFilesToTarAsync(context, path, cancellationToken); } return(uploadPath); }
private Task <string> GetUploadPathAsync(ContentFormat contentFormat, AgentTaskPluginExecutionContext context, Fingerprint pathFingerprint, string[] pathSegments, string workspaceRoot, CancellationToken cancellationToken) { if (contentFormat == ContentFormat.SingleTar) { var(tarWorkingDirectory, isWorkspaceContained) = GetTarWorkingDirectory(pathSegments, workspaceRoot); return(TarUtils.ArchiveFilesToTarAsync( context, pathFingerprint, tarWorkingDirectory, isWorkspaceContained, cancellationToken )); } return(Task.FromResult(pathFingerprint.Segments[0])); }