How to use @heroku-cli/plugin-run - 2 common examples

To help you get started, we’ve selected a few @heroku-cli/plugin-run examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github heroku / heroku-repo / commands / purge_cache.js View on Github external
function * run (context) {
  const repo = require('../lib/repo')
  const app = context.app

  let dyno = new Dyno({
    heroku: cli.heroku,
    app,
    attach: true,
    command: `set -e
mkdir -p tmp/repo_tmp/unpack
cd tmp/repo_tmp
curl -fo repo-cache.tgz '${yield repo.getCacheURL(app)}'
cd unpack
tar -zxf ../repo-cache.tgz
METADATA="vendor/heroku"
if [ -d "$METADATA" ]; then
  TMPDIR=\`mktemp -d\`
  cp -rf $METADATA $TMPDIR
fi
cd ..
rm -rf unpack
github heroku / heroku-repo / commands / gc.js View on Github external
function * run (context) {
  const repo = require('../lib/repo')
  const app = context.app

  let dyno = new Dyno({
    heroku: cli.heroku,
    app,
    attach: true,
    command: `set -e
mkdir -p tmp/repo_tmp/unpack
cd tmp/repo_tmp
curl -fo repo.tgz '${yield repo.getURL(app)}'
cd unpack
tar -zxf ../repo.tgz
git gc --aggressive
tar -zcf ../repack.tgz .
curl -fo /dev/null --upload-file ../repack.tgz '${yield repo.putURL(app)}'
exit`
  })
  yield dyno.start()
}

@heroku-cli/plugin-run

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io) [![Version](https://img.shields.io/npm/v/@heroku-cli/plugin-run.svg)](https://npmjs.org/package/@heroku-cli/plugin-run) [![CircleCI](https://circleci.com/gh/heroku/heroku

ISC
Latest version published 1 year ago

Package Health Score

59 / 100
Full package analysis

Popular @heroku-cli/plugin-run functions