nixpkgs/pkgs/applications/networking/cluster/terraform-providers/update-all-providers
zowoq 215002fb9f terraform-providers: update scripts
- add flag to skip building updated providers
- have the github action skip building providers so we don't need to handle build failures in the script
- remove outdated `vendor` flag, all providers use `buildGoModule`
2022-02-07 12:02:36 +10:00

23 lines
500 B
Plaintext
Executable File

#!/usr/bin/env nix-shell
#! nix-shell -I nixpkgs=../../../../.. -i bash -p jq
# shellcheck shell=bash
# Update all providers which have specified provider source address
set -euo pipefail
providers=$(
jq -r 'to_entries
| map_values(.value + { alias: .key })
| .[]
| select(."provider-source-address"?)
| .alias' providers.json
)
echo "Will update providers:"
echo "${providers}"
for provider in ${providers}; do
echo "Updating ${provider}"
./update-provider "$@" "${provider}"
done