File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -ex
4+
5+ cd " $( dirname " ${BASH_SOURCE[0]} " ) " /..
6+
7+ get_latest () {
8+ git tag |
9+ # drop `v` prefix
10+ grep " ^v" |
11+ cut -c2- |
12+
13+ # sort by semantic version
14+ sort -t " ." -k1,1n -k2,2n -k3,3n |
15+
16+ # last
17+ tail -n 1 |
18+
19+ # drop newline
20+ tr -d ' \n'
21+ }
22+
23+ latest=" $( get_latest) "
24+
25+ git grep --line-number " # LATEST" examples > want.txt
26+ git grep --line-number " \" $latest \" # LATEST" examples > got.txt
27+
28+ if ! git diff --no-index --exit-code want.txt got.txt; then
29+ echo " "
30+ echo " ❌ Detected old versions! Make sure that all versions \` version = \" ...\" # LATEST\` match the latest git tag: $latest "
31+ exit 1
32+ fi
Original file line number Diff line number Diff line change 77 command : .buildkite/shellcheck.sh
88 - label : " :terraform:"
99 command : .buildkite/terraform-validate.sh
10+ - label : " :lint-roller:"
11+ command : .buildkite/check-latest-tag.sh
Original file line number Diff line number Diff line change @@ -6,14 +6,14 @@ locals {
66
77module "networking" {
88 source = " sourcegraph/executors/aws//modules/networking"
9- version = " 0.0.21"
9+ version = " 0.0.21" # LATEST
1010
1111 availability_zone = local. availability_zone
1212}
1313
1414module "docker-mirror" {
1515 source = " sourcegraph/executors/aws//modules/docker-mirror"
16- version = " 0.0.21"
16+ version = " 0.0.21" # LATEST
1717
1818 vpc_id = module. networking . vpc_id
1919 subnet_id = module. networking . subnet_id
@@ -23,7 +23,7 @@ module "docker-mirror" {
2323
2424module "executors-codeintel" {
2525 source = " sourcegraph/executors/aws//modules/executors"
26- version = " 0.0.21"
26+ version = " 0.0.21" # LATEST
2727
2828 vpc_id = module. networking . vpc_id
2929 subnet_id = module. networking . subnet_id
@@ -38,7 +38,7 @@ module "executors-codeintel" {
3838
3939module "executors-batches" {
4040 source = " sourcegraph/executors/aws//modules/executors"
41- version = " 0.0.21"
41+ version = " 0.0.21" # LATEST
4242
4343 vpc_id = module. networking . vpc_id
4444 subnet_id = module. networking . subnet_id
Original file line number Diff line number Diff line change 55
66module "executors" {
77 source = " sourcegraph/executors/aws"
8- version = " 0.0.21"
8+ version = " 0.0.21" # LATEST
99
1010 availability_zone = local. availability_zone
1111 executor_instance_tag = " codeintel-prod"
You can’t perform that action at this time.
0 commit comments