https://github.com/bbkane/git-xargs-tasks
Keep git-xargs changes together
https://github.com/bbkane/git-xargs-tasks
Last synced: 10 months ago
JSON representation
Keep git-xargs changes together
- Host: GitHub
- URL: https://github.com/bbkane/git-xargs-tasks
- Owner: bbkane
- Created: 2023-10-23T22:20:39.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-28T05:08:20.000Z (about 2 years ago)
- Last Synced: 2025-03-24T19:49:32.682Z (over 1 year ago)
- Language: Shell
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Hold [git-xargs](https://github.com/gruntwork-io/git-xargs) scripts I use to update my repos.
# Basic steps for a change
- update [example-go-cli](https://github.com/bbkane/example-go-cli) with change and test
- write script to update fling but don't commit
- Format is `[date]-[name-of-change]/{run.sh,change.sh}`, where `run.sh` calls `git-xargs` with `change.sh` if necessary
- source `GITHUB_OAUTH_TOKEN` and do gitconfig workaround (see below)
- run script against fling
- run against other repos
- merge PRs and update spreadsheet
- restore gitconfig
# Links
- https://blog.gruntwork.io/introducing-git-xargs-an-open-source-tool-to-update-multiple-github-repos-753f9f3675ec
- https://docs.google.com/spreadsheets/d/1R0c6VFFU_vLC45zgs_53rcWDHWRxt4S6UxdxBkFgPpo/edit?usp=sharing
- https://github.com/gruntwork-io/git-xargs#how-to-supply-commands-or-scripts-to-run
- https://mikefarah.gitbook.io/yq/
- https://www.bbkane.com/blog/go-notes/#code-updates-across-repos
# Run Notes
Needs `GITHUB_OAUTH_TOKEN` in environment. If necessary, create one at [Personal Access Tokens (Classic)](https://github.com/settings/tokens) (I use the classic tokens with all repo acccess).
Envelope steps:
```zsh
enventory env create
enventory var create --name GITHUB_OAUTH_TOKEN
cd . # trigger env loading
```
## .gitconfig modifications
Due to https://github.com/gruntwork-io/git-xargs/issues/48, I need to
temporarily put user.name and user.email in .root gitconfig...
```bash
fling unlink --ask false -s ~/Git-GH/dotfiles/git
git config --global user.name "Benjamin Kane"
git config --global user.email "6081085+bbkane@users.noreply.github.com"
git config list --global
```
After running `git-xargs`, I need to re-symlink my git config:
```bash
rm ~/.gitconfig
fling link --ask false -s ~/Git-GH/dotfiles/git
```