Commit graph

101 commits

Author SHA1 Message Date
Oliver Davies a1554f5607
chore(dotfiles): allow setting the dotfiles path
Allow overriding the dotfiles directory using the `DOTFILES_DIR` variable.
2022-05-31 23:26:30 +01:00
Oliver Davies ce42ad67d8 fix(dotfiles): clone or update the dotfiles repo 2022-04-26 20:57:31 +01:00
Oliver Davies c7c6acdd9b chore(dotfiles): use Ansible Vault password file 2022-04-26 20:55:52 +01:00
Oliver Davies c8dca4e168 feat(dotfiles): install Ansible 2022-04-26 14:43:21 +01:00
Oliver Davies 7ee57545ce feat(*): allow for filtering the playbook by role
Allow for appending ansible-playbook arguments to the dotfiles script,
and automatically applying tags to the included roles.

For example:

`./bin/dotfiles --tags=neovim`
2022-04-20 21:45:45 +01:00
Oliver Davies 093df0ac09 chore(*): remove WSL checks
This is no longer needed since roles can be excluded within the
`~/.config/dotfiles/values.yaml` file.
2022-04-20 21:42:37 +01:00
Oliver Davies 5c0bf2c712 chore: automatically skip tags if in WSL 2022-03-31 00:19:57 +01:00
Oliver Davies dd14486223 feat(git): configure local settings 2022-03-30 23:58:15 +01:00
Oliver Davies 5390e77716 feat: add dotfiles script 2022-03-30 23:41:06 +01:00
Oliver Davies b5dabaf9fc chore(tmux): search in ~/Documents/Books 2021-09-24 12:54:07 +01:00
Oliver Davies 8e3c3adaa5 Remove tat command and automatically loading tmux
This isn't needed now that the tmux-sessioniser is working, and it also
means that there isn't a weird "System32" session automatically created
within WSL2, or with my username in Pop!_OS.
2021-09-17 22:38:00 +01:00
Oliver Davies d39bfee514 fix: Make tmux-sessioniser work outside of tmux 2021-09-17 22:35:53 +01:00
Oliver Davies e699c03b90 fix: sort directory list before piping to fzf 2021-09-17 21:26:34 +01:00
Oliver Davies 282fe69810 fix: ignore directories starting with a period 2021-09-17 21:25:49 +01:00
Oliver Davies 73e76b4d97 feat: add tmux-sessioner script
Add a script for quickly navigating between directories using fzf and
tmux sessions. Executable within zsh and Vim.
2021-09-17 19:42:11 +01:00
Oliver Davies 7fed1cf922 Use stow for managing dotfiles 2021-07-27 14:38:40 +01:00
Oliver Davies e76f02f64b git: Simplify the git-opr command
Rewritten in bash and as a wrapper around GitHub's `gh` command.

- Pushed an unpushed branch to origin.
- Opens an existing pull request if one exists.
- Creates a new pull request if one doesn't exist.
2021-05-21 23:26:21 +01:00
Oliver Davies fc8cdb3ee4 git: Add create-new-tracking-branch command 2021-05-21 23:26:21 +01:00
Oliver Davies c52b1f4f90 Use shorter prefix for branch names 2021-04-18 16:31:18 +01:00
Oliver Davies 374f036b79 git: Refactor to be based on the gh CLI tool 2020-11-11 07:18:05 +00:00
Oliver Davies 66e5d7b1ca Prevent publishing a main branch 2020-10-12 09:15:27 +01:00
Oliver Davies fdaec03018
Use full username for branch prefix 2020-09-13 21:56:19 +01:00
Oliver Davies a85ff2e8bb Run phpunit or pest depending on the project
Remove the `p` and `pf` aliases that previously only worked for PHPUnit,
and re-add them as functions that run either PHPUnit or Pest PHP based
on the project dependencies.

The checking is done within the `phpunit-or-pest` script and then used
within the new `p` and `pf` functions.
2020-07-23 16:24:23 +01:00
Oliver Davies 0f797c6ffe Prefer "main" to "master"
See
1e7fa50da0.

> This commit introduces `git-master-to-main-wrapper`, which seamlessly
prefers `main` to `master` but works fine with repos that do use
a `master` branch.
2020-07-19 22:06:30 +01:00
Oliver Davies 40fed34898 Add drupalorg CLI script 2020-06-21 00:13:38 +01:00
Oliver Davies 66e1869c72 git: Ensure that everything is clean 2020-06-01 19:54:57 +01:00
Oliver Davies 964472bbf5 git: Add option to force merge and skip CI check 2020-05-30 03:46:54 +01:00
Oliver Davies 171f251d89 git: Add methods for writing messages
Refactor CI status output.
2020-05-27 18:44:13 +01:00
Oliver Davies e8ff1fcc82 git: Don't push if the merge failed
Add support for two different run types:

- Command: executes the command silently and returns whether or not
  there was an error. This is used to check if the merge was
  successful.
- Query: executes the command and returns the output. This is used for
  retrieving the tip commits of the branch.
2020-05-27 17:56:15 +01:00
Oliver Davies e82e134e51 git: Refactor, use getopt() for parsing args 2020-05-27 16:11:38 +01:00
Oliver Davies 01a30f5168 git: Specify target branch using -t or --target
Rather than using an environment variable, use -t or --target to specify
the target branch to merge into (e.g. master, develop, next).
2020-05-27 11:26:18 +01:00
Oliver Davies 54b762b734 git: Ensure branches are in sync with upstream 2020-05-27 10:55:46 +01:00
Oliver Davies 35834bef8f git: Ensure methods have visibility set 2020-05-27 10:54:00 +01:00
Oliver Davies a1c3231a48 git: Allow for setting the target branch 2020-05-27 10:53:33 +01:00
Oliver Davies 979aa4a1fc git: Re-order methods, move invoke to near the top 2020-05-27 09:48:14 +01:00
Oliver Davies af429a74a4 git: Add check for CI error 2020-05-23 00:12:21 +01:00
Oliver Davies 87d5b689b2 git: Refactor to a lookup table 2020-05-23 00:05:24 +01:00
Oliver Davies 89ef98a15b git: Update abort message, remove break 2020-05-23 00:02:05 +01:00
Oliver Davies f98ebdba1e git: Check for CI status before closing the PR 2020-05-22 23:11:37 +01:00
Oliver Davies 16dd74bfe7 git: Add close-pull-request script 2020-05-22 22:52:12 +01:00
Oliver Davies 4a8fd3b6a0 Add git-abort and git-continue 2020-04-29 12:15:38 +01:00
Oliver Davies a8d75fc417 git: Simplify git-publish command 2020-04-29 12:12:27 +01:00
Oliver Davies 8cd7957e2c Add git.sh script
Allows for using git commands whilst specifying a SSH key to use.

See https://alvinabad.wordpress.com/2013/03/23/how-to-specify-an-ssh-key-file-with-the-git-command.
2020-01-16 00:55:50 +00:00
Oliver Davies b9d048b364 Add git-delete-merged-branches 2020-01-15 16:18:11 +00:00
Oliver Davies 987d1d6801 Add usage notes for git-publish 2020-01-15 08:28:26 +00:00
Oliver Davies 12e4c4be77 Add option to prefix the remote branch name 2020-01-15 08:17:14 +00:00
Oliver Davies b90c128062 Prevent publishing of production branches 2019-11-07 13:43:18 +00:00
Oliver Davies 323a70f596 Add git-up command 2019-11-07 12:42:15 +00:00
Oliver Davies 1dcafb48c4 Add tat 2019-10-22 14:21:33 +01:00
Oliver Davies 295dd570c7 Add custom git commands 2019-10-22 14:21:33 +01:00
Oliver Davies ceb01ff80c Add bin directory for custom scripts 2019-10-11 20:16:10 +01:00