Commit Graph

190 Commits

Author SHA1 Message Date
Tim Byrne 4b5b6c44d3
Release 1.11.0
Update version number and update documentation

* Option for Cygwin to copy files instead of symlink (#62)
* Support `YADM_DISTRO` in Jinja templates (#68)
* Support pre/post hooks for every command (#70)
2017-07-09 23:07:50 -05:00
Tim Byrne df1f7493ab
Add documentation for `YADM_DISTRO` support in Jinja templates 2017-07-07 08:33:14 -05:00
Tim Byrne bf61ad662d
Add new detail to HOOKS documentation 2017-07-06 21:53:23 -05:00
Tim Byrne 557ce93fab
Add tests for hooks 2017-07-05 16:33:50 -05:00
Tim Byrne 0168bcfb5e
Query worktree directly from repo 2017-07-05 16:32:54 -05:00
Tim Byrne 61270c8277
Prevent command from running if "pre" hook fails 2017-07-05 08:12:29 -05:00
Tim Byrne f73c873681
Expose some internal data to all hooks
* Command run by yadm
* Full commandline arguments
* Repo directory
* Worktree
* Exit status (for post hooks)
2017-07-05 08:12:29 -05:00
Tim Byrne 35743e3711
Tie "post" hooks to yadm exits
There are many cases where yadm may exit early (particularly when
encountering an error).
2017-07-03 16:25:23 -05:00
Tim Byrne 880964e2b2
Some initial tweaks to hooks
* No not require `.sh` extension. Hooks can be written in any language.
* Use `[` for the `-x` test
* Clean up debug message and formatting
2017-07-03 16:25:03 -05:00
Tim Byrne df21cd2cb8
Merge pull request #70 from cweagans/hooks
Dropping changes to `yadm.md` and `CONTRIBUTORS`. These are built
programmatically during releases.
2017-07-03 16:24:13 -05:00
Tim Byrne 5293db986a
Support `YADM_DISTRO` in Jinja templates (#68) 2017-07-03 16:21:27 -05:00
Tim Byrne 280b1179f7
Add `lsb-release` to testbed (to support YADM_DISTRO) 2017-07-03 16:21:06 -05:00
Cameron Eagans cf06ca3f42 Add myself as a contributor 2017-06-22 17:32:47 -06:00
Cameron Eagans 8ff804c1a9 Regenerate yadm.md 2017-06-22 17:32:39 -06:00
Cameron Eagans 8d1151a609 Document hooks 2017-06-22 17:32:31 -06:00
Cameron Eagans 41409631a1 Add script hooks 2017-06-22 17:32:16 -06:00
Tim Byrne 7538851fe3
Gracefully handle changes in yadm.cygwin-copy 2017-06-01 17:06:27 -05:00
Tim Byrne f8e0bd593d
Support `yadm.cygwin-copy` configuration (#62)
With `yadm.cygwin-copy` set to "true", alternate files will be copies
instead of symlinks, but only when running on Cygwin.
2017-05-31 18:28:54 -05:00
Tim Byrne 68937f3cad
Release 1.10.0
Update version number and update documentation

* Fix `COMP_WORDS bad array subscript` bug (#64)
* Transition to semantic versioning
2017-05-10 17:46:37 -05:00
Tim Byrne 79e149ed25
Switch to semantic versioning 2017-05-10 08:00:29 -05:00
Tim Byrne 9d21376f88
Merge pull request #64 from Mellbourn/fix-negative-comp-words
Including tweaks to conditional statements

I think the original conditionals would always be false. That prevents
using completions which rely on identifying the penultimate and
antepenultimate portions of typed commandline.
2017-05-08 16:30:30 -05:00
Klas Mellbourn 708b491d88 fix for getting 'COMP_WORDS bad array subscript' on completing yadm
I stared getting these errors when pressing tab after 'yadm '. This seems to be due to COMP_CWORD being negative, so this is the fix I applied
2017-05-07 22:43:10 +02:00
Tim Byrne 246eab8b52
Release 1.09
Update version number and update documentation

* Add Bash completion script (#60)
* Support WSL detection (#61)
* Add introspect command (used by completion)
2017-05-04 07:22:48 -05:00
Tim Byrne 356c47a19f
Add Bash completion script (#60)
* Add completion script
* Add introspection
2017-04-24 07:49:10 -05:00
Tim Byrne eabf9091fb
Support WSL detection (#61)
`uname -s` was already being executed every run for *cygwin* detection.
I've consolidated all of the OS detection into a single function. This
also fixed the problem of running `uname -s` twice for the `alt`
command.
2017-04-09 08:47:18 -05:00
Tim Byrne df4652d6de
Release 1.08
Update version number and update documentation

* Fix bug alternates based on `CLASS` (#51)
* Support globs and paths with space in .yadm/encrypt (#53, #54)
* Add support for alternate files using Jinja templates (#56, #58)
* Add `enter` command, for creating a sub-shell (#57)
* Support local.hostname properly (#59)
2017-04-03 07:09:32 -05:00
Tim Byrne 9824de5410
Change template indicator to `##yadm.j2` 2017-03-31 16:42:51 -05:00
Tim Byrne 0b1b810722
Generalize documentation for `enter` 2017-03-31 16:27:17 -05:00
Tim Byrne 588bc6eafe
Support local.hostname properly (#59) 2017-03-31 12:43:32 -05:00
Tim Byrne fda2da6a5b
Fix tests that set local.hostname (#59) 2017-03-31 12:43:32 -05:00
Tim Byrne c053481c21
Adjust minor details about Jinja processing 2017-03-31 00:34:29 -05:00
Tim Byrne 3a87fe311a
Add test case for envtpl missing 2017-03-31 00:04:28 -05:00
Tim Byrne 00133032ef
Add minor improvements to template processing
* Determine envtpl using `command -v` instead of `which` (more portable)
* Anchor the end of template file names in regex
* Quote variables to allow for whitespace in file names
2017-03-30 23:51:23 -05:00
Tim Byrne aaa4152fac
Remove trailing whitespace 2017-03-30 21:58:26 -05:00
Tim Byrne 5f47794104
Add `envtpl` to testbed docker image 2017-03-30 21:45:16 -05:00
Tim Byrne fd6fa8c923
Merge pull request #58 from janschulz/jinja_processing
Excluding yadm.md changes (these will happen during a release)
2017-03-30 17:00:27 -05:00
Tim Byrne 73a931e920
Unify the capitalization of Git 2017-03-30 16:30:49 -05:00
Tim Byrne b4e73abc9f
Reformat `enter` documentation 2017-03-30 16:30:44 -05:00
Tim Byrne 6974e4ce8c
Add tests for `enter` command 2017-03-30 16:30:39 -05:00
Tim Byrne 4e05be7020
Set prompt for sub-shells 2017-03-30 16:30:22 -05:00
Tim Byrne 1c34bc8e7f
Merge pull request #57 from renard/enter-function 2017-03-30 16:28:31 -05:00
Jan Schulz ca849b50de Autogenerate yadm.md after new jinja functionality 2017-03-26 03:49:24 +02:00
Jan Schulz a479b70d8a Add jinja processing to alt command
With the new functionality, when the 'alt' command is called (or automatically
triggered), any file with a name ending in '##yadm_tmpl' is treated as a jinja
template. The template is processed by envtpl and the result is written to a
file without the '##yadm_tmpl' name. The variables passed into the template
processing are

  YADM_CLASS
  YADM_OS
  YADM_HOSTNAME
  YADM_USER

These variables are set according to the normal rules for
CLASS, OS, HOSTNAME, and USER during the alt processing.
2017-03-26 03:49:24 +02:00
Tim Byrne 5678e383d8
Give priority to CLASS by processing those patterns separately (#51) 2017-03-25 12:55:46 -05:00
Tim Byrne 297df5d231
Add tests for classes with a range of names (#51) 2017-03-25 11:32:06 -05:00
Tim Byrne 5141433776
Support encrypt globs and paths with space (#53, #54) 2017-03-24 17:37:40 -05:00
Tim Byrne d80bbff2b9
Acceptance tests for encrypt globs and paths with space (#53, #54) 2017-03-24 17:37:40 -05:00
Sébastien Gross 831461e91e Add `enter` function for easier interaction with git repo.
Run a subshell with all git variables set. This can be used to easily
interact with your git repository. This is also useful if you are using
Emacs Tramp and magit to manage your directory.

Signed-off-by: Sébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>
2017-03-21 11:53:13 +01:00
Tim Byrne a78fe20c5d
Add notes about common release steps 2017-02-11 11:36:58 -06:00
Tim Byrne def7e732db
Release 1.07
Update version number and update documentation

* Add `CLASS` to supported alt-link patterns (#21)
* Add bootstrap command (#42)
* Support wildcards for alt-links (#43)
* Stash conflicting data during clone (#44)
* Offer bootstrap after successful clone (#45)
* Display supported configs for `yadm config` (#46)
* Add "curl-pipe" program to clone without installation (#48)
* Fix bug in alt-link regular expressions (#49)
2017-02-10 14:53:52 -08:00