コード例 #1
0
ファイル: Build.cs プロジェクト: FacilityApi/FacilityPython
 void PublishPipPackage(bool ignoreFailure = false)
 {
     var settings = new AppRunnerSettings
     {
         Arguments        = "-m twine upload dist/* --verbose".Split(),
         WorkingDirectory = "pip",
     };
     if (ignoreFailure)
     {
         settings.IsExitCodeSuccess = _ => true;
     }
     RunApp("python", settings);
 }
コード例 #2
0
    /// <summary>
    /// Runs the local tool with the specified settings.
    /// </summary>
    /// <param name="settings">The settings to use when running the tool.</param>
    public int Run(AppRunnerSettings settings)
    {
        if (settings is null)
        {
            throw new ArgumentNullException(nameof(settings));
        }

        if (settings.WorkingDirectory is not null)
        {
            throw new ArgumentException($"{nameof(settings.WorkingDirectory)} not supported for local tools.", nameof(settings));
        }

        settings           = settings.Clone();
        settings.Arguments = new[] { "tool", "run", m_name, "--" }.Concat(settings.Arguments ?? Enumerable.Empty <string>());
        if (m_directory != ".")
        {
            settings.WorkingDirectory = m_directory;
        }

        return(RunDotNet(settings));
    }
コード例 #3
0
 /// <summary>
 /// Runs the tool with the specified settings.
 /// </summary>
 /// <param name="settings">The settings to use when running the tool.</param>
 public int Run(AppRunnerSettings settings) => RunApp(ToolPath, settings);