コード例 #1
0
        private static string GetBuildLocationPath(BuildTarget buildTarget,
                                                   BuildTargetGroup buildTargetGroup,
                                                   BuildOptions options,
                                                   string outputFolder,
                                                   string outputFileName)
        {
            var fileExtension = buildTarget.GetExtension(buildTargetGroup, options);
            var fileName      = outputFileName.IsNullOrWhiteSpace() ? DefaultFileName : outputFileName;

            // check if the output folder is actually a file path (for backwards compatibility)
            if (Path.HasExtension(outputFolder))
            {
                return(outputFolder);
            }

            // if retrieved file extension is empty then that means the output is a folder
            return(!fileExtension.IsNullOrWhiteSpace()
                ? PathHelpers.Combine(outputFolder, string.Format("{0}.{1}", fileName, fileExtension))
                : outputFolder);
        }