addChocolateyTasks function

void addChocolateyTasks()

Enables tasks for building and uploading packages to Chocolatey.

Implementation

void addChocolateyTasks() {
  if (_addedChocolateyTasks) return;
  _addedChocolateyTasks = true;

  freezeSharedVariables();
  chocolateyToken.freeze();
  chocolateyFiles.freeze();
  chocolateyNuspec.freeze();

  addTask(GrinderTask('pkg-chocolatey',
      taskFunction: () => _build(),
      description: 'Build a Chocolatey package directory.'));

  addTask(GrinderTask('pkg-chocolatey-pack',
      taskFunction: () => _nupkg(),
      description: 'Build a nupkg archive to upload to Chocolatey.',
      depends: ['pkg-chocolatey']));

  addTask(GrinderTask('pkg-chocolatey-deploy',
      taskFunction: () => _deploy(),
      description: 'Deploy the Chocolatey package to Chocolatey.',
      depends: ['pkg-chocolatey-pack']));
}