diff options
author | Anish Athalye <me@anishathalye.com> | 2018-05-24 10:30:24 -0400 |
---|---|---|
committer | Anish Athalye <me@anishathalye.com> | 2018-05-24 19:07:11 -0400 |
commit | 7a19cd219abcea59880f65512264e81c182832ce (patch) | |
tree | 1769211b98003cd2ccd0fb7075f96fe84c4e2a4b | |
parent | 2f4cc0d9cb70235e7c5820dc4e7dd89b1d375fb5 (diff) |
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.
-rw-r--r-- | .gitmodules | 2 | ||||
m--------- | lib/pyyaml | 0 | ||||
-rw-r--r-- | test/Vagrantfile | 3 | ||||
-rw-r--r-- | test/test-lib.bash | 6 | ||||
-rwxr-xr-x | test/test_travis | 2 | ||||
-rw-r--r-- | test/tests/shim.bash | 29 | ||||
-rwxr-xr-x | tools/git-submodule/install | 1 |
7 files changed, 34 insertions, 9 deletions
diff --git a/.gitmodules b/.gitmodules index 111c39c..ffb9af9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "lib/pyyaml"] path = lib/pyyaml - url = https://github.com/anishathalye/pyyaml + url = https://github.com/yaml/pyyaml ignore = dirty diff --git a/lib/pyyaml b/lib/pyyaml -Subproject f30c956c11aa6b5e7827fe5840cc9ed40b938d1 +Subproject 7e026bfee9cc0bddeb1bbca0c4a0bcd826c2bfd diff --git a/test/Vagrantfile b/test/Vagrantfile index 8ce1739..05d6747 100644 --- a/test/Vagrantfile +++ b/test/Vagrantfile @@ -2,8 +2,7 @@ Vagrant.configure(2) do |config| config.vm.box = 'debian/stretch64' # sync by copying for isolation - config.vm.synced_folder "..", "/dotbot", type: "rsync", - rsync__exclude: ".git/" + config.vm.synced_folder "..", "/dotbot", type: "rsync" # disable default synced folder config.vm.synced_folder ".", "/vagrant", disabled: true diff --git a/test/test-lib.bash b/test/test-lib.bash index 008c2f8..b334b81 100644 --- a/test/test-lib.bash +++ b/test/test-lib.bash @@ -1,10 +1,6 @@ DEBUG=${DEBUG:-false} USE_VAGRANT=${USE_VAGRANT:-true} -if ${USE_VAGRANT}; then - DOTBOT_EXEC=${DOTBOT_EXEC:-"python /dotbot/bin/dotbot"} -else - DOTBOT_EXEC=${DOTBOT_EXEC:-"/dotbot/bin/dotbot"} -fi +DOTBOT_EXEC=${DOTBOT_EXEC:-"python /dotbot/bin/dotbot"} DOTFILES="/home/$(whoami)/dotfiles" INSTALL_CONF='install.conf.yaml' INSTALL_CONF_JSON='install.conf.json' diff --git a/test/test_travis b/test/test_travis index 20ec1ae..79439e1 100755 --- a/test/test_travis +++ b/test/test_travis @@ -6,7 +6,7 @@ set -e # set -x # set -v -BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +export BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # Prevent execution outside of Travis CI builds if [[ "${TRAVIS}" != true || "${CI}" != true ]]; then diff --git a/test/tests/shim.bash b/test/tests/shim.bash new file mode 100644 index 0000000..2ed7d54 --- /dev/null +++ b/test/tests/shim.bash @@ -0,0 +1,29 @@ +test_description='install shim works' +. '../test-lib.bash' + +test_expect_success 'setup' ' +cd ${DOTFILES} +git init +if ${USE_VAGRANT}; then + git submodule add /dotbot dotbot +else + git submodule add ${BASEDIR} dotbot +fi +cp ./dotbot/tools/git-submodule/install . +echo "pear" > ${DOTFILES}/foo +' + +test_expect_success 'run' ' +cat > ${DOTFILES}/install.conf.yaml <<EOF +- link: + ~/.foo: foo +EOF +if ! ${USE_VAGRANT}; then + sed -i "" "1 s/sh$/python/" ${DOTFILES}/dotbot/bin/dotbot +fi +${DOTFILES}/install +' + +test_expect_success 'test' ' +grep "pear" ~/.foo +' diff --git a/tools/git-submodule/install b/tools/git-submodule/install index b1baa33..f11b48b 100755 --- a/tools/git-submodule/install +++ b/tools/git-submodule/install @@ -9,6 +9,7 @@ DOTBOT_BIN="bin/dotbot" BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" cd "${BASEDIR}" +git -C "${DOTBOT_DIR}" submodule sync --recursive git submodule update --init --recursive "${DOTBOT_DIR}" "${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}" |