using System; using UnityEngine; namespace Ubisoft.Hotel.Package { /// /// Class responsible for storing information related to the CICD pipeline job that built the player. /// It is populated ONLY for builds made by CICD. /// [Serializable] public class PipelineJob { [SerializeField] private string m_branchName = ""; [SerializeField] private string m_buildNumber = ""; /// /// CICD pipeline job. /// /// Name of the branch for which the pipeline job was executed. /// Number of the build for this branch, such as '153'. public PipelineJob(string branchName, string buildNumber) { BranchName = branchName; BuildNumber = buildNumber; } public string BranchName { get { return m_branchName; } private set { m_branchName = value; } } /// /// Returns the branch name after applying some encoding ('%' instead of '/') that should be used when adding it to the build file name /// so it can be copied around with no trouble. /// public string EncodedBranchName { get { return m_branchName?.Replace('/', '%'); } } public string BuildNumber { get { return m_buildNumber; } private set { m_buildNumber = value; } } public override string ToString() { return $"branchName: {BranchName} buildNumber: {BuildNumber}"; } } }