From f235e9270f2fba57cca2fdba77ff25ee51cf4e5f Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Mon, 22 Jul 2019 12:56:13 -0400 Subject: [PATCH] Add ability for module update script to only download plugins, not also update them --- scripts/update_plugin_modules.sh | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/scripts/update_plugin_modules.sh b/scripts/update_plugin_modules.sh index cbd1b12058..885796f26b 100755 --- a/scripts/update_plugin_modules.sh +++ b/scripts/update_plugin_modules.sh @@ -14,20 +14,23 @@ git clone https://github.com/hashicorp/vault for plugin in $(grep github.com/hashicorp/vault-plugin- vault/go.mod | cut -f 2 | cut -d ' ' -f 1 | cut -d '/' -f 3) do - echo "Fetching $plugin..." - git clone https://github.com/hashicorp/$plugin - cd $plugin - rm -rf vendor - go get github.com/hashicorp/vault/api@master - go mod tidy - go mod vendor - git add . - git commit --allow-empty -m "Updating vault dep" - if [ ! -z $PUSH_COMMITS ] + if [ -z $SKIP_MODULE_UPDATING ] then - git push + echo "Fetching $plugin..." + git clone https://github.com/hashicorp/$plugin + cd $plugin + rm -rf vendor + go get github.com/hashicorp/vault/api@master + go mod tidy + go mod vendor + git add . + git commit --allow-empty -m "Updating vault dep" + if [ ! -z $PUSH_COMMITS ] + then + git push + fi + cd .. fi - cd .. cd vault go get github.com/hashicorp/$plugin@master cd ..