forked from asyrjasalo/RESTinstance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release
executable file
·33 lines (22 loc) · 1.04 KB
/
release
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash
set -e
### consts #####################################################################
this_path="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
## variables ###################################################################
registry_url="$1"
version=$(cat "$this_path/src/REST/version.py" | cut -d"'" -f2 | sed "s/'//g")
### release ####################################################################
if [ -z "$registry_url" ]; then
echo "Usage: $0 REGISTRY_URL"
echo ""
echo " e.g.: $0 https://your.registry.com:5000/restinstance"
exit 64
fi
echo "### Tagging image 'rfdocker:restinstance' to '$registry_url:$version'"
docker tag "rfdocker:restinstance" "$registry_url:$version"
echo "### Pushing image 'restinstance:$version' to registry..."
docker push "$registry_url:$version"
echo "### Tagging image 'rfdocker:restinstance' to '$registry_url:latest'"
docker tag "rfdocker:restinstance" "$registry_url:latest"
echo "### Pushing image 'rfdocker:restinstance' to '$registry_url:latest'"
docker push "$registry_url:latest"