Skip to content

Instantly share code, notes, and snippets.

@johno
Last active January 6, 2017 19:26
Show Gist options
  • Save johno/ea38055a248fa133c8c7 to your computer and use it in GitHub Desktop.
Save johno/ea38055a248fa133c8c7 to your computer and use it in GitHub Desktop.
Tachyons maintenance -- Clone all repos from an org or user with github-repositories cli package on npm, upgrade all modules, publish modules, etc.
github-repositories REPO_NAME | sed 's/.* //' | xargs -L1 git clone
@johno
Copy link
Author

johno commented Jan 21, 2016

Upgrade all dependencies:

ls -l | sed 1d | sed 's/.* //' | xargs -L1 sh -c 'cd "$0" && ncu --upgradeAll --packageFile=$(pwd)/package.json && npm i'

@johno
Copy link
Author

johno commented Jan 21, 2016

Commit changes:

ls -l | sed 1d | sed 's/.* //' | xargs -L1 sh -c 'cd "$0" && git add . && git commit -m "Some package cleanup" && git push'

@johno
Copy link
Author

johno commented Jan 21, 2016

Pull all changes:

ls -l | sed 1d | sed 's/.* //' | xargs -L1 sh -c 'cd "$0" && git pull --rebase origin master'

@johno
Copy link
Author

johno commented Jan 21, 2016

Publish the things:

npm start && git add . && git commit -m "Cleanup package" && gtag '2.0.2' && ggpusht && npm publish

@johno
Copy link
Author

johno commented Jan 28, 2016

Edit all the pages all at once

find . -name "*.html" -print0 | xargs -0 sed -i'' -e 's/"general\/images\//"\/docs\/general\/images\//g'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment