From da6efc3e7dad302aa9fee1cc80a64f724ed82467 Mon Sep 17 00:00:00 2001 From: Holger Rapp Date: Thu, 5 Apr 2018 21:52:33 +0200 Subject: [PATCH] Rename scripts -> docker. Make repro more useful. --- .travis.yml | 6 +++--- Dockerfile | 6 +++--- Dockerfile.repro | 5 +++-- Makefile | 2 +- {scripts => docker}/build_vim.sh | 0 {scripts => docker}/docker_vimrc.vim | 0 {scripts => docker}/download_vim.sh | 0 {scripts => docker}/install_packages.sh | 0 {scripts => docker}/load_docker_cache.sh | 0 {scripts => docker}/run_tests.sh | 0 {scripts => docker}/save_docker_cache.sh | 0 docker/snippets/all.snippets | 3 +++ 12 files changed, 13 insertions(+), 9 deletions(-) rename {scripts => docker}/build_vim.sh (100%) rename {scripts => docker}/docker_vimrc.vim (100%) rename {scripts => docker}/download_vim.sh (100%) rename {scripts => docker}/install_packages.sh (100%) rename {scripts => docker}/load_docker_cache.sh (100%) rename {scripts => docker}/run_tests.sh (100%) rename {scripts => docker}/save_docker_cache.sh (100%) create mode 100644 docker/snippets/all.snippets diff --git a/.travis.yml b/.travis.yml index 86be95d..5128368 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,13 +15,13 @@ env: - VIM_VERSION="8.0" PYTHON_IMAGE=3.6-stretch TAG=vim_80_py3 DOCKER_CACHE_FILE=/home/travis/docker/vim_80_py3.tar.gz - VIM_VERSION="git" PYTHON_IMAGE=3.6-stretch TAG=vim_git_py3 DOCKER_CACHE_FILE=/home/travis/docker/vim_git_py3.tar.gz -before_install: scripts/load_docker_cache.sh +before_install: docker/load_docker_cache.sh install: - docker build -t ultisnips:${TAG} --build-arg PYTHON_IMAGE=${PYTHON_IMAGE} --build-arg VIM_VERSION=${VIM_VERSION} . script: - - docker run -it ultisnips:${TAG} scripts/run_tests.sh - - scripts/save_docker_cache.sh + - docker run -it ultisnips:${TAG} docker/run_tests.sh + - docker/save_docker_cache.sh notifications: webhooks: diff --git a/Dockerfile b/Dockerfile index 37f6cc8..789aee3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,11 +4,11 @@ FROM python:${PYTHON_IMAGE} ARG VIM_VERSION -COPY scripts/install_packages.sh src/scripts/ +COPY docker/install_packages.sh src/scripts/ RUN src/scripts/install_packages.sh -COPY scripts/download_vim.sh src/scripts/ +COPY docker/download_vim.sh src/scripts/ RUN src/scripts/download_vim.sh -COPY scripts/build_vim.sh src/scripts/ +COPY docker/build_vim.sh src/scripts/ RUN src/scripts/build_vim.sh # We clone the plugins we currently depend on manually here. Initially we check diff --git a/Dockerfile.repro b/Dockerfile.repro index c94e011..ff0ce44 100644 --- a/Dockerfile.repro +++ b/Dockerfile.repro @@ -5,6 +5,7 @@ FROM ultisnips:${BASE_IMAGE} RUN curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim -ADD scripts/docker_vimrc.vim /root/.vimrc - +ADD docker/docker_vimrc.vim /root/.vimrc RUN vim -c 'PlugInstall | qa' + +ADD docker/snippets /root/.vim/UltiSnips diff --git a/Makefile b/Makefile index fc04429..ba9dec9 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ image_repro: image_vim_80_py3 # A reproduction image that drops you into a naked environment, # with a Vim having UltiSnips and vim-snippets configured. See -# scripts/docker_vimrc.vim for the full vimrc. Need to run `make +# docker/docker_vimrc.vim for the full vimrc. Need to run `make # image_repro` before this will work. repro: docker run -it -v ${MAKEFILE_DIR}:/src/UltiSnips ultisnips:repro /bin/bash diff --git a/scripts/build_vim.sh b/docker/build_vim.sh similarity index 100% rename from scripts/build_vim.sh rename to docker/build_vim.sh diff --git a/scripts/docker_vimrc.vim b/docker/docker_vimrc.vim similarity index 100% rename from scripts/docker_vimrc.vim rename to docker/docker_vimrc.vim diff --git a/scripts/download_vim.sh b/docker/download_vim.sh similarity index 100% rename from scripts/download_vim.sh rename to docker/download_vim.sh diff --git a/scripts/install_packages.sh b/docker/install_packages.sh similarity index 100% rename from scripts/install_packages.sh rename to docker/install_packages.sh diff --git a/scripts/load_docker_cache.sh b/docker/load_docker_cache.sh similarity index 100% rename from scripts/load_docker_cache.sh rename to docker/load_docker_cache.sh diff --git a/scripts/run_tests.sh b/docker/run_tests.sh similarity index 100% rename from scripts/run_tests.sh rename to docker/run_tests.sh diff --git a/scripts/save_docker_cache.sh b/docker/save_docker_cache.sh similarity index 100% rename from scripts/save_docker_cache.sh rename to docker/save_docker_cache.sh diff --git a/docker/snippets/all.snippets b/docker/snippets/all.snippets new file mode 100644 index 0000000..e3ebf45 --- /dev/null +++ b/docker/snippets/all.snippets @@ -0,0 +1,3 @@ +snippet example "Repro case example" +This is a simple snippet example +endsnippet