update build script

This commit is contained in:
Jeffrey Picard 2021-07-14 19:27:49 -04:00
parent b31f0ed74c
commit 37853629ee
2 changed files with 16 additions and 4 deletions

View file

@ -1,4 +0,0 @@
#!/bin/bash
go build .
sudo docker build . -t lbry/hub:latest

16
build_and_push.sh Executable file
View file

@ -0,0 +1,16 @@
#!/bin/bash
# Get new tags from remote
git fetch --tags
# Get latest tag name
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)
# Checkout latest tag
git checkout $latestTag
go build .
docker build . -t lbry/hub:latest
docker tag lbry/hub:latest lbry/hub:$latestTag
docker push lbry/hub:latest
docker push lbry/hub:$latestTag