1
0
Fork 0
mirror of synced 2024-09-16 09:52:53 -04:00
Commit graph

69 commits

Author SHA1 Message Date
Anish Athalye
f15293b3d5 Rename 'canonicalize-path' into 'canonicalize'
This parallels 'relative' (it's not 'relative-path'). The old
'canonicalize-path' is still supported for backward compatibility.
2021-02-25 08:26:19 -05:00
Anish Athalye
66489f7955 Fix missing endings of heredocs 2021-02-25 08:16:27 -05:00
Anish Athalye
dac7a9bc88 Add --debug flag to test driver
This is easier than the old method of adding `DEBUG=true` to the top of
test files.
2021-02-25 08:14:34 -05:00
E. Keys
c35382c06d Add cli option force shell show stderr/stdout
Passing `--verbose` flag two times will now force shell commands to show
stderr/stdout output regardless of settings in config file.

Resolves #104
2021-02-25 08:00:07 -05:00
E. Keys
b18ba4d392 Make parsed CLI options available to plugins 2021-02-25 07:57:12 -05:00
Anish Athalye
22ed23c7d9 Merge branch 'etkeys/feature/glob-with-exclude' 2021-02-25 06:59:22 -05:00
E. Keys
6c6fee697e Improve globbing behavior with leading '.' 2021-02-25 06:44:14 -05:00
Anish Athalye
945c1e5a4e Add mode option to create directive
See <https://github.com/anishathalye/dotbot/issues/260>. Thanks to
@eengstrom for the feature suggestion.
2021-02-25 06:25:17 -05:00
Anish Athalye
d7629553bd Switch to GitHub Actions 2020-12-18 15:34:15 -05:00
Anish Athalye
cf366bbf66 Fix interaction between --only and defaults
We should treat defaults specially, and even when `--only` is
specified, we should always run defaults.
2020-11-22 16:58:00 -05:00
E. Keys
2ec7a24129 Add exclude parameter for link globbing
- Added `exclude` parameter to _link_. Now, an array of glob patterns
    can be given that will be used to remove items from a glob match.
    This parameter will only have an effect when `glob` is `true`.
- Updated README to add description for `exclude` and add in examples.

Resolves #247
2020-11-22 14:13:11 -05:00
Anish Athalye
c5e709d433 Make error for empty config a little friendlier
In the setup guide in the README, we have people start out with an empty
file (created using `touch`). Before this patch, Dotbot gave the
following error:

    Configuration file must be a list of tasks

Instead, with this patch, Dotbot says:

    Configuration file is empty, no work to do

This change was prompted by
https://github.com/anishathalye/dotbot/pull/226.
2020-06-25 16:07:23 -04:00
Anish Athalye
7ffaa65482 Add --only and --except command-line arguments
Internal to Dotbot, we use the name "skip" instead of "except", because
the latter is a keyword, and using a name like "except_" didn't seem as
nice.
2020-03-26 11:23:07 -04:00
Anish Athalye
ec8498ffb8 Merge branch 'ypid/add/link_real_path_option' 2020-01-03 16:46:19 -05:00
Anish Athalye
320d5d0123 Add tests for canonicalize-path 2020-01-03 16:45:35 -05:00
Anish Athalye
6d24613b0b Unify Vagrant and Travis-CI tests
This patch makes the tests (including the test driver) run entirely
inside Vagrant, which avoids calling the very slow `vagrant` driver many
times for running the tests. On my machine, `./test` runs in 22 seconds,
down from hundreds of seconds prior to this patch.

This also has the nice side effect of matching how the Travis CI tests
were run, so there's no need for a separate `test_travis` anymore.
2020-01-03 15:34:46 -05:00
Anish Athalye
e38e021ab3 Add option to clean recursively 2019-12-31 19:14:23 -05:00
Anish Athalye
81f0d74955 Fix clean not respecting defaults
Previously, clean read the defaults once, and then it updated the
setting for each entry it read. This resulted in the defaults being
clobbered and then not being respected for subsequent entries. This
patch fixes the issue by re-reading the defaults before processing each
item.

The other plugins (link, shell) do not have this problem.
2019-12-31 14:47:32 -05:00
Albert Puig
eabd84bce1 Add ignore-missing option to link 2019-12-31 14:25:53 -05:00
Paulo Fagundes
d2913e6cee Replace which with command -v
Some distributions such as Arch Linux no longer install `which` by
default through the base package (see
https://www.archlinux.org/news/base-group-replaced-by-mandatory-base-package-manual-intervention-required/).

The maintainers have explained why `command -v` is superior:
https://www.reddit.com/r/archlinux/comments/de1er6/arch_linux_news_base_group_replaced_by_mandatory/f2v8uhu/.
2019-11-09 12:38:01 -05:00
Anish Athalye
04c113b5b8 Merge branch 'jesseleite/create-directive' 2019-10-12 11:55:18 -04:00
Jesse Leite
5a0f6676d4 Add 'create' directive to create directories 2019-10-12 11:55:09 -04:00
Anish Athalye
32741ea0ca Switch to more recent version of Debian 2019-10-12 10:36:35 -04:00
Anish Athalye
5e2d40939e Merge branch 'thtliife/suppress-shell-cmd' 2018-11-21 19:50:46 -05:00
Anish Athalye
dc05786693 Add test 2018-11-21 19:50:32 -05:00
Anish Athalye
1be9f7532b Add test 2018-11-19 20:38:29 -05:00
Anish Athalye
b0ce63904c Add test for conditional linking 2018-10-16 20:22:50 -04:00
Ben Klein
a9cf9fffe4 Implement conditional linking 2018-10-16 20:22:40 -04:00
Anish Athalye
9332cde5ad Add test for environment variable expansion 2018-08-06 20:53:17 -04:00
Anish Athalye
9d967ad7e8 Include built-in plugins in PyPI distribution 2018-06-11 21:14:10 -04:00
Anish Athalye
30caaf2780 Add PyPI package
This patch also makes the '-d' argument optional, with the base
directory defaulting to the directory of the configuration file.
2018-05-30 10:23:53 -04:00
Anish Athalye
b5ab016986 Merge branches 'yaml' and 'basedir' 2018-05-29 21:50:08 -04:00
Anish Athalye
7a19cd219a Point PyYAML dependency to official repository
Previously, PyYAML was hosted on BitBucket, so we had a mirror of the
repo on GitHub. Now, official hosting has moved to GitHub, so we can
point to the official repository instead. Thanks to Marco A. Feliu
<marco.feliu@nianet.org> for pointing this out.

This patch also updates the install shim to update submodule URLs. To
preserve the functionality of earlier Dotbot versions, we will need to
maintain 'https://github.com/anishathalye/pyyaml'. Because old versions
of the install shim used with new Dotbot versions will not update
submodule URLs, we will need to keep the old repository in sync with the
upstream repository as we upgrade PyYAML versions.

This patch also upgrades the dependency to PyYAML 3.12.
2018-05-24 19:07:11 -04:00
Anish Athalye
c3f271481a Fix handling of base directory
Prior to this patch, Dotbot was relying on running with the base
directory being the current working directory. In practice, it was
relying on the install shim to set up this context. It makes more sense
sense to actually execute `chdir()` within Dotbot itself, rather than
relying on the install shim to do so.
2018-05-24 12:57:49 -04:00
Anish Athalye
972e80f188 Fix tests on Travis CI
The tests were failing due to the '~/bin' directory already existing on
the machine. This patch changes the tests to use the directory name
'foo'.
2018-04-13 08:49:02 -04:00
Anish Athalye
8d08e4b1ad Add tests for globbing 2018-04-13 08:49:02 -04:00
Anish Athalye
a517c4c5d0 Fix bug in test harness
Because 'bin/dotbot' is a hybrid sh/Python script that finds the
appropriate Python binary and then runs, the test code should not invoke
it as an sh script when sh does not source the pyenv initialization
script.

The fix implemented in this patch is to directly run 'bin/dotbot' as a
Python script using 'python', which when called from bash, will run with
the correct Python version (because bash is set up to source the pyenv
initialization script).
2018-03-27 21:50:31 -04:00
Anish Athalye
b7022f4abb Speed up Vagrant tests
This patch removes the snapshot/rollback system for the tests and
replaces it with a simple cleanup script that removes the appropriate
files from the VM's $HOME before every test. A side benefit is that
there is no more dependency on the Sahara plugin.

The cleanup script may not provide as good isolation between independent
tests as the previous setup, but it is orders of magnitude faster to run
without a VM rollback for every single test, and it does not break any
of the current tests.
2018-03-27 20:56:55 -04:00
Anish Athalye
9ff1db1672 Change default Python version in tests to 3.6.4 2018-03-27 18:16:55 -04:00
Anish Athalye
04fb8adbd9 Add instructions for installing test env on macOS 2018-03-27 17:42:42 -04:00
Anish Athalye
f8f46960f4 Merge branch 'nagromc/tests-instructions' 2018-03-27 17:41:14 -04:00
Morgan Courbet
174949d1fc Add instructions for installing test env on Debian 2018-03-27 17:41:07 -04:00
Anish Athalye
46b17366a3 Update to Debian 9 (Stretch) for testing 2018-03-27 17:26:34 -04:00
Anish Athalye
f1e8297255 Fix bug with shell defaults 2017-06-27 21:27:50 -07:00
Anish Athalye
53eb3851d1 Make launcher find python binary 2017-04-19 08:40:15 -04:00
Anish Athalye
32aa475903 Number repeated names for easier identification 2017-04-18 22:50:28 -04:00
Anish Athalye
bf2a9330da Merge branch 'dein0s/feature/clean_plugin_add...' 2017-03-26 11:50:41 -04:00
Anish Athalye
190c800272 Fix tests for Travis CI
This patch makes it so the `travis_cleanup` function removes broken
symlinks properly.
2017-03-26 11:50:01 -04:00
dein0s
a2a9e1fb91 Add force option to clean plugin 2017-03-26 11:19:26 -04:00
Anish Athalye
2abfa7fd91 Add tests for more Python versions 2017-03-06 15:20:27 -05:00