Skip to content

Commit

Permalink
Git version in a tag!
Browse files Browse the repository at this point in the history
  • Loading branch information
kaihendry committed Jul 29, 2022
1 parent 133b504 commit 44f5e12
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 15 deletions.
30 changes: 15 additions & 15 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions git-describe.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
echo { \"version\": \"$(git describe --tags --always --dirty)\"}
5 changes: 5 additions & 0 deletions init.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ terraform {
}
}

data "external" "git_describe" {
program = ["${path.module}/git-describe.sh"]
}

provider "aws" {
region = local.region
default_tags {
tags = {
Source = "https://github.com/kaihendry/hello-eks"
Version = data.external.git_describe.result["version"]
}
}
}
Expand Down

0 comments on commit 44f5e12

Please sign in to comment.