dig txt version.sslip.io returns version

I needed a way of determining the version that a server was running. I
orginally considered a command-line argument, but then I thought, "Why
not create a DNS record for it? That way I can query running servers
without needing to ssh onto the machine."

The TXT record consists of three distinct strings: version, compile
date, and git hash.

```bash
dig txt version.sslip.io +short
    "2.2.1"
    "2021/10/03-15:08:54+0100"
    "6a928eb"
```
This commit is contained in:
Brian Cunnie
2021-10-03 14:48:38 +01:00
parent c74792b588
commit f1f66a0f3b
4 changed files with 36 additions and 11 deletions

View File

@@ -6,9 +6,12 @@ they might not make sense unless you're on my workstation.
```zsh
export OLD_VERSION=2.1.2
export VERSION=2.2.0
cd ~/go/src/github.com/cunnie/sslip.io
cd ~/workspace/sslip.io
git pull -r --autostash
sed -i '' "s~/$OLD_VERSION/~/$VERSION/~g" k8s/document_root/index.html # update the download instructions on the website
# update the version number for the TXT record for version.sslip.io
sed -i '' "s/$OLD_VERSION/$VERSION/g" bin/make_all
# update the download instructions on the website
sed -i '' "s~/$OLD_VERSION/~/$VERSION/~g" k8s/document_root/index.html
cd bosh-release/
lpass show a # refresh LastPass token
. ~/workspace/deployments/.envrc # set BOSH auth