Last active
January 6, 2017 19:26
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| github-repositories REPO_NAME | sed 's/.* //' | xargs -L1 git clone |
Author
Author
Upgrade all dependencies:
ls -l | sed 1d | sed 's/.* //' | xargs -L1 sh -c 'cd "$0" && ncu --upgradeAll --packageFile=$(pwd)/package.json && npm i'
Author
Commit changes:
ls -l | sed 1d | sed 's/.* //' | xargs -L1 sh -c 'cd "$0" && git add . && git commit -m "Some package cleanup" && git push'
Author
Pull all changes:
ls -l | sed 1d | sed 's/.* //' | xargs -L1 sh -c 'cd "$0" && git pull --rebase origin master'
Author
Publish the things:
npm start && git add . && git commit -m "Cleanup package" && gtag '2.0.2' && ggpusht && npm publish
Author
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
Execute command in all cloned directories: