const execSync = require('child_process').execSync;

/**
 A semantic release "publish" plugin to create git tags and publish using elm-package
 */
async function tagElmRelease(config, context) {
  const newVersion = context.nextRelease.version;
  exec(`git tag -a ${newVersion} -m "elm-package release ${newVersion}"`);
  exec(`git push --tags`);
  exec(`elm-package publish`);
}

function exec(command, context) {
  context.logger.log(`Running: ${command}`);
  execSync(command);
}

module.exports = tagElmRelease;

const execSync = require('child_process').execSync;

/**
 A semantic release "publish" plugin to create git tags and publish using elm-package
 */
async function tagElmRelease(config, context) {
  function exec(command) {
    context.logger.log(`Running: ${command}`);
    execSync(command);
  }

  const newVersion = context.nextRelease.version;
  exec(`git tag -a ${newVersion} -m "elm-package release ${newVersion}"`);
  exec(`git push --tags`);
  exec(`elm-package publish`);
}

module.exports = tagElmRelease;

Fix error with elm deployments
fix(ci): Fix error with elm deployments

Note: this update does not change any user facing code and is related
to our continuous integration / semantic release process only.
I am tagging it as "fix" so we can continue to test the release process.
