From b1c819655b910a882d3e09e6f3d4778eb97555d4 Mon Sep 17 00:00:00 2001 From: Chelsea Troy Date: Thu, 12 Mar 2015 14:13:32 -0500 Subject: [PATCH] Changed method to determine whether to download unstable or release lattice tarball. + Uses egrep with regex pattern to look for `git describe` format. [Finishes #87262154] Signed-off-by: David Wadden --- terraform/local-scripts/download-lattice-tar | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/local-scripts/download-lattice-tar b/terraform/local-scripts/download-lattice-tar index 0e6d13f9..03423c0c 100755 --- a/terraform/local-scripts/download-lattice-tar +++ b/terraform/local-scripts/download-lattice-tar @@ -8,7 +8,7 @@ else lattice_tar_version=$(cat $LATTICE_VERSION_FILE_PATH) - if grep "-" $LATTICE_VERSION_FILE_PATH; then #it's unstable, released versions have hyphenless tag names as the git describe. + if egrep '\-\d+-g[0-9a-fA-F]{7,10}$' $LATTICE_VERSION_FILE_PATH; then # unstable versions match `git describe` format lattice_download_url="https://s3-us-west-2.amazonaws.com/lattice/unstable/$lattice_tar_version/lattice.tgz" else lattice_download_url="https://s3-us-west-2.amazonaws.com/lattice/releases/$lattice_tar_version/lattice.tgz"