Commit Graph

542 Commits

Author SHA1 Message Date
Tim Byrne afab29c5fc
Update version number and update documentation
* Improve handling of submodules at upgrade (#284, #285, #293)
* Improve Zsh completions (#292, #298)
* Use stderr for error messages (#297)
2021-01-07 09:24:11 -06:00
Tim Byrne 9b83169ae9
Merge pull request #298 from erijo/zsh-completion 2021-01-07 09:19:09 -06:00
Erik Flodin 57eed9742a
Rework zsh completion fallback
Don't rely on internals from the git completion. Instead set up the
environment and then simply call _git and let it do the completion as
it see fit.

See #292.
2021-01-06 20:36:07 +01:00
Tim Byrne aaf519623b
Merge pull request #297 from erijo/error-on-stderr 2021-01-06 10:20:59 -06:00
Erik Flodin 6378fe3073
Print errors to stderr
This makes it possible to run e.g. "yadm -Y foo introspect repo
2>/dev/null" and get an empty output instead of getting the error
message about foo not being fully qualified.
2021-01-05 21:57:32 +01:00
Erik Flodin cd50c128ba
Fix test when test is run from a git worktree 2021-01-05 21:56:50 +01:00
Tim Byrne 630bc69b37
Merge pull request #29 from erijo/zsh-git-completion 2021-01-04 20:03:08 -06:00
Erik Flodin d6f623c546
Support fallback to git completion from git
Fixes #292
2021-01-05 00:25:24 +01:00
Tim Byrne ca5aba43c3
Merge pull request #287 from erijo/bootstrap.d 2021-01-04 14:06:13 -06:00
Tim Byrne 1c9dff7a42
Update documentation for changes to upgrade 2021-01-04 13:14:07 -06:00
Tim Byrne 0b4aa767fb
Merge pull request #293 from erijo/submodule-upgrade 2021-01-04 12:52:39 -06:00
Tim Byrne 4a4f426058
Merge pull request #284 from erijo/upgrade 2021-01-04 12:20:51 -06:00
Erik Flodin 5818eeb9dd
Change handling of submodules at upgrade
Start with doing "submodule absorbgitdirs" as otherwise "submodule
deinit" will fail if a module has been cloned first and later added as
a submodule (as it will then contain the .git dir instead of it being
under the superprojects .git dir).

Then try to deinit the submodules before moving the repo and abort the
upgrade if it fails for any submodule. Then do the move and finally
initialize the submodules that were initialized before the upgrade.

See #285
2021-01-04 18:31:24 +01:00
Erik Flodin 230b8b9374
Basic test to verify upgrade using real yadm releases
Both with and without submodules.
2021-01-04 17:33:48 +01:00
Tim Byrne 0675bc9240
Merge pull request #288 from erijo/testyadm-version 2021-01-02 12:10:18 -06:00
Erik Flodin f67189c6b7
Use local version of yadm by default (in testhost/scripthost)
Also symlink instead of copy in that case, so that changes locally can
be reflected in the testhost directly, and print the used version in a
more readable format.
2021-01-02 00:05:00 +01:00
Erik Flodin 7d216d47e0
Add example bootstrap script to run files in bootstrap.d
This script will, when installed as yadm's bootstrap script, run all
executables in $YADM_DIR/bootstrap.d.
2021-01-01 22:23:53 +01:00
Tim Byrne dcfa55ce49
Update version number and update documentation
* Support encryption with OpenSSL (#138)
* Support "include" directive in built-in template processor (#255)
* Support extensions for alternate files and templates (#257)
* Improve support for default branches (#231, #232)
* Add --version and --help as yadm internal commands (#267)
* Improve support for XDG base directory specification
* Use XDG_DATA_HOME used for encrypted data and repository (#208)
* Default repo is now ~/.local/share/yadm/repo.git
* Default encrypted archive is now ~/.local/share/yadm/archive
* Improve shell completions (#238, #274, #275)
* Remove support for YADM_COMPATIBILITY=1 (#242)
* Remove deprecated option cygwin-copy
* Fix template mode inheritance on FreeBSD (#243, #246)
* Fix hook execution under MinGW (#150)
* Improve compatibility with Oil shell (#210)
2020-12-30 16:59:58 -06:00
Tim Byrne 018ccb0a65
Update spec so it can build against a repo (#225)
The directory is only changed if not already in the project directory.
2020-12-30 16:54:52 -06:00
Tim Byrne 207e0a9850
Use -E instead of -r
The BSD version of sed doesn't support -r, but -E seems universally
supported.
2020-12-30 14:46:04 -06:00
Tim Byrne 1f82ccc2b9
Merge pull request #282 from erijo/testenv 2020-12-30 14:28:03 -06:00
Tim Byrne 7c1192ae2e
Support upgrading from version 1 repos
* yadm upgrade now updates legacy paths created by yadm 1
* Warnings are issued for invalid alternates again
2020-12-30 14:19:49 -06:00
Erik Flodin 8d15eb970e
Don't pass -k to py.test when doing make test/test_foo.py
As py.test then complains about "Wrong expression passed to '-k'"
2020-12-30 12:54:14 +01:00
Erik Flodin 32cc51c391
Document version=local in make usage text 2020-12-30 12:54:13 +01:00
Erik Flodin 64da1a6bee
Include released yadm versions also in testenv 2020-12-30 12:54:13 +01:00
Erik Flodin d926fb3e8b
Run "make test" in github workflow
This avoids having to specify the docker image in multiple places.
2020-12-30 12:54:13 +01:00
Erik Flodin 44de30374f
Only run docker in interactive mode when stdin is a terminal 2020-12-30 12:54:12 +01:00
Erik Flodin a9d9e89d0c
Use a common target to pick yadm to test in test/scripthost 2020-12-30 12:01:40 +01:00
Tim Byrne 0d3ff086c5
Add test for --no-zle shell option 2020-12-29 17:58:51 -06:00
Tim Byrne c7a789c871
Merge pull request #281 from erijo/zsh-tramp 2020-12-29 17:29:45 -06:00
Erik Flodin 8a3fb1a518
Make yadm enter work with zsh and tramp
zle must be disabled when using tramp, otherwise it doesn't work.
2020-12-29 23:58:05 +01:00
Tim Byrne d0b0e3afa8
Update testbed version 2020-12-29 16:53:03 -06:00
Tim Byrne f363b4b29f
Merge pull request #277 from erijo/docker 2020-12-29 16:37:57 -06:00
Tim Byrne 2ebac70bbc
Merge pull request #279 from erijo/zsh-debug 2020-12-29 16:36:17 -06:00
Erik Flodin 48e7337ef1
Upgrade to latest pytest version (6.2.1) 2020-12-29 21:51:57 +01:00
Erik Flodin ec3956c560
Configure git email and name in docker
to make it easier to use yadm in the container. Set it in the system
config (i.e. /etc/gitconfig) to avoid getting a clash if one wants to
clone an existing yadm repo that contains a .gitconfig.
2020-12-29 21:50:56 +01:00
Erik Flodin 0500f6c6f6
zsh: -d can't be used as a global option
It's only supported as a command option and the command will fail if
-d is used as a global option. Instead of completing it in the wrong
place, don't complete it at all as it can be considered an "internal"
switch (it's not mentioned in the manual).
2020-12-29 21:30:00 +01:00
Erik Flodin 6fc510f473
Include released versions of yadm in docker images
Make it easier to test upgrades (#276).
2020-12-29 19:49:41 +01:00
Erik Flodin 6df2a5df74
Shrink docker image
Don't install apt recommendations and use the ADD directive instead of
running curl in the image. Saves ~380MB in docker image size.
2020-12-29 19:11:45 +01:00
Erik Flodin 39e43a7a74
Remove the requirement on docker-compose for running tests
Besides simplifying the setup it also has the nice side-effect of
being able to override the docker image on the command line:
$ make test IMAGE=foobar
2020-12-29 18:25:58 +01:00
Tim Byrne d005ce4df4
Merge pull request #278 from erijo/contrib 2020-12-29 10:03:39 -06:00
Erik Flodin 22d5e03657
Fix contrib make target
Set shell explicitly as it doesn't work with the default shell on Debian.
2020-12-29 15:38:51 +01:00
Tim Byrne 53e3288234
Reorganize shell completion code 2020-12-28 12:05:39 -06:00
Tim Byrne 2ff07c3fa6
Merge remote-tracking branch 'erijo/zsh-symlink' into develop 2020-12-28 10:57:13 -06:00
Tim Byrne 2321120b5b
Merge pull request #274 from erijo/zsh 2020-12-28 10:50:15 -06:00
Tim Byrne 35f1ef8d22
Merge pull request #238 from cdayjr/easier-zsh-completion-install 2020-12-28 10:40:20 -06:00
Erik Flodin 900d59707a
Add _yadm symlink to ease zsh completion usage from source
It is now possible to use the completion simply by doing:
fpath=(/path/to/yadm/completion/zsh $fpath); compinit
2020-12-28 15:39:39 +01:00
Erik Flodin fec3daa730
Improve zsh completion (#265)
Fall back to standard git completion for non yadm commands.
2020-12-28 15:32:22 +01:00
Tim Byrne b3beaa48be
Add basic usage to information on GitHub 2020-12-27 21:57:13 -06:00
Tim Byrne 7184eb59d7
Merge pull request #273 from erijo/legacy_path_warnings 2020-12-27 21:13:32 -06:00