コード例 #1
0
        private static async Task <int> AddAssetsAsync(AddAssetSubOptions subOptions)
        {
            try
            {
                ConfigureLogging(subOptions.LogFilePath);

                var github = subOptions.CreateGitHubClient();

                await AddAssets(github, subOptions.RepositoryOwner, subOptions.RepositoryName, subOptions.TagName, subOptions.AssetPaths);

                return(0);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);

                return(1);
            }
        }
コード例 #2
0
        private static async Task <int> AddAssetsAsync(AddAssetSubOptions subOptions)
        {
            try
            {
                ConfigureLogging(subOptions.LogFilePath);

                var github = subOptions.CreateGitHubClient();
                _configuration = ConfigurationProvider.Provide(subOptions.TargetDirectory ?? Environment.CurrentDirectory, _fileSystem);

                await AddAssets(github, subOptions.RepositoryOwner, subOptions.RepositoryName, subOptions.TagName, subOptions.AssetPaths);

                return(0);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);

                return(1);
            }
        }