private static string GetKeyPrefix(UploadAddressableToS3Settings settings) { string prefix = string.IsNullOrWhiteSpace(settings.KeyPrefix) ? string.Empty : (settings.KeyPrefix + "/"); var cloudBuildConfig = CloudBuildManifest.Find(); string buildFolder = cloudBuildConfig != null ? "cloud_build/" + cloudBuildConfig.ScmCommitId + "/" : "local_build/" + Environment.MachineName + "/"; // Make sure to sanitize for special characters; BuildTargetGroup buildTargetGroup = BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget); return(prefix + buildFolder + buildTargetGroup); }
public RuntimeBuildConfig(string guid, string name, Dictionary <string, string> variables) { this.buildConfigGuid = guid; this.buildConfigName = name; this.cloudBuildManifest = CloudBuildManifest.Find(); if (variables != null) { this.keyValuePairs = new List <KeyValuePair>(); foreach (var keyValuePair in variables) { this.keyValuePairs.Add(new KeyValuePair(keyValuePair.Key, keyValuePair.Value)); } } }
private static string GetBlobPrefix(UploadAddressableToAzureSettings settings) { string blobPrefix = string.Empty; // making sure it uses all forward slashes and doesn't start with a forward slash if (string.IsNullOrWhiteSpace(settings.blobPrefix) == false) { blobPrefix = SanitizeAndRemoveTrailingForwardSlash(settings.blobPrefix) + "/"; blobPrefix = blobPrefix.StartsWith("/") ? blobPrefix.Substring(1) : blobPrefix; } var cloudBuildConfig = CloudBuildManifest.Find(); string buildFolder = cloudBuildConfig != null ? "cloud_build/" + cloudBuildConfig.ScmCommitId + "/" : "local_build/" + Environment.MachineName + "/"; // TODO [bgish]: Make sure to sanitize for special characters; return(blobPrefix + buildFolder + EditorUserBuildSettings.activeBuildTarget); }
public static string Generate(CloudBuildManifest buildManifest) { if (!string.IsNullOrEmpty(CACHED)) { return(CACHED); } var buildManifestIsAvailable = buildManifest != null; var stringBuilder = new StringBuilder(EmailPage.SEPERATOR); stringBuilder.Append("\n"); stringBuilder.Append("Cloud Build Target Name: "); if (buildManifestIsAvailable) { stringBuilder.Append(buildManifest.CloudBuildTargetName); } stringBuilder.Append("\n"); stringBuilder.Append("Project Id: "); if (buildManifestIsAvailable) { stringBuilder.Append(buildManifest.ProjectId); } stringBuilder.Append("\n"); stringBuilder.Append("Bundle Id: "); if (buildManifestIsAvailable) { stringBuilder.Append(buildManifest.BundleId); } stringBuilder.Append("\n"); stringBuilder.Append("Build Version: "); stringBuilder.Append(Application.version); stringBuilder.Append("\n"); stringBuilder.Append("Build Number: "); if (buildManifestIsAvailable) { stringBuilder.Append(buildManifest.BuildNumber); } stringBuilder.Append("\n"); stringBuilder.Append("Branch: "); if (buildManifestIsAvailable) { stringBuilder.Append(buildManifest.ScmBranch); } stringBuilder.Append("\n"); stringBuilder.Append("Unity Version: "); if (buildManifestIsAvailable) { stringBuilder.Append(buildManifest.UnityVersion); } stringBuilder.Append("\n"); #if !UNITY_IPHONE stringBuilder.Append("xCode Version: "); if (buildManifestIsAvailable) { stringBuilder.Append(buildManifest.XcodeVersion); } stringBuilder.Append("\n"); #endif stringBuilder.Append("Commit Id: "); if (buildManifestIsAvailable) { stringBuilder.Append(buildManifest.ScmCommitId); } stringBuilder.Append("\n"); stringBuilder.Append("Build Start Time: "); if (buildManifestIsAvailable) { stringBuilder.Append(buildManifest.BuildStartTime); } stringBuilder.Append("\n"); stringBuilder.Append("\n"); return(CACHED = stringBuilder.ToString()); }