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);
        }
Exemplo n.º 2
0
        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);
        }