summaryrefslogtreecommitdiff
path: root/imagebuild/common/extract_upper_constraints_from_tox_ini.sh
blob: 86bd99733ec7053c41aa413b97bf84cf9e7af5db (plain)
1
2
3
4
5
6
7
8
9
#!/bin/bash
# NOTE(mmitchell): This extracts the URL defined as the default value for
#                  UPPER_CONSTRAINTS_FILE in tox.ini. This is used by image
#                  builders to avoid duplicating the default value in multiple
#                  scripts. This is specially done to leverage the release
#                  tools that automatically update the tox.ini when projects
#                  are released.
sed -n 's/^.*{env:UPPER_CONSTRAINTS_FILE\:\([^}]*\)}.*$/\1/p' $1 | head -n1