1
0
Fork 0
mirror of synced 2024-11-13 21:18:57 -05:00
Commit graph

616 commits

Author SHA1 Message Date
Tim Byrne
999692fe5e
Merge pull request #307 from rasa/rs/simplify_parse_encrypt 2021-02-15 12:45:31 -06:00
Tim Byrne
1461b1ac33
Merge pull request #311 from erijo/test-upgrade-typo 2021-02-15 12:42:17 -06:00
Tim Byrne
a8e5b20021
Move shellcheck option below license 2021-02-15 12:39:27 -06:00
Tim Byrne
8ece22ab2a
Merge pull request #306 from rasa/rs/default-shellcheck 2021-02-15 12:33:22 -06:00
Tim Byrne
79f7aae073
Remove unnecessary [[ 2021-02-15 12:27:55 -06:00
Tim Byrne
88ee3f09fb
Merge pull request #301 from erijo/relative-path 2021-02-15 12:11:21 -06:00
Erik Flodin
7b1bfac12b
Update the man page to match new clone behavior (from #289) 2021-02-08 23:00:13 +01:00
Tim Byrne
c4327d0099
Fix compatibility bug with Git completions (#318)
Git 2.30.0 removed an internal function yadm completion depended upon.
This change retains the old function call for compatibility.
2021-02-07 16:30:27 -06:00
Tim Byrne
31071d9ac9
Clarify error message
Conflicts are not stashed anymore
2021-02-04 00:06:00 -06:00
Tim Byrne
e6cfd39bbc
Remove mktemp dependency 2021-02-03 22:46:48 -06:00
Tim Byrne
9c999c7998
Merge pull request #289 from erijo/clone 2021-02-03 21:18:24 -06:00
Ross Smith II
96471a6d68
Fix updating of readonly files 2021-01-30 18:17:59 -08:00
Erik Flodin
990b4ce119
Fix typo in test (can_upgraded_... -> can_upgrade_...) 2021-01-17 19:07:36 +01:00
Ross Smith II
84136a8633
Remove unneeded duplicate line 2021-01-11 17:17:11 -08:00
Ross Smith II
0c788ae020
Simplify parse_encrypt by exiting early
if encrypt file doesn't exist.

Signed-off-by: Ross Smith II <ross@smithii.com>
2021-01-10 19:07:21 -08:00
Ross Smith II
fecbb315df
Add 'shellcheck shell=bash' as the default
See https://github.com/koalaman/shellcheck/wiki/Directive#shell

Signed-off-by: Ross Smith II <ross@smithii.com>
2021-01-10 18:49:28 -08:00
Erik Flodin
e2ed647c2a
Tighten up parsing of if-statement in default template
Require space after if and an ending %} after the condition.
2021-01-10 20:53:12 +01:00
Erik Flodin
accec694f5
Deinit submodules before removing the repo
when forcing init/clone to happen.
2021-01-08 22:21:35 +01:00
Erik Flodin
fb56513d17
zsh: complete all supported git clone parameters for yadm clone 2021-01-08 22:21:27 +01:00
Erik Flodin
f45e66d4da
Rework clone
Instead of doing work to find the default branch just to be able to
set up the repository before doing a fetch, do a "git clone" and let
git handle it.

Use -c core.sharedrepository=0600 to get the same result as
--shared=0600 passed to init.

Use --separate-git-dir to get the git directory in $YADM_REPO. Use a
temporary dir as work tree and remove it right after the clone is
done.

When the clone is done, iterate over all missing files in $YADM_WORK
and perform a checkout. If local files exists that differ compared
with the cloned ones the local files are left intact and the user is
instructed to deal with the conflicts.
2021-01-08 22:05:46 +01:00
Erik Flodin
a321c88c7c
Support passing relative paths to --yadm-* and -w
Relative paths are expanded relative the current working dir as
expected.
2021-01-08 21:45:55 +01:00
Tim Byrne
a5b1067e02
Update version number and update documentation
* Fix parsing by sh (#299)
2021-01-07 10:49:26 -06:00
Tim Byrne
b32025bcc3
Fix parsing by sh (#299) 2021-01-07 10:46:06 -06:00
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