-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathmake-release-linux.sh
More file actions
executable file
·44 lines (38 loc) · 941 Bytes
/
make-release-linux.sh
File metadata and controls
executable file
·44 lines (38 loc) · 941 Bytes
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
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
#
# Usage example:
# ./make-release-linux.sh -v 3.2
#
set -e
function print_usage () {
echo Usage:
echo " `basename $0` -v <version>"
}
while getopts ":v:" name; do
case $name in
v)
VERSION=${OPTARG}
;;
\?)
echo "Invalid option ${OPTARG}" >&2
print_usage
exit 1
;;
:)
echo "Value of the option ${OPTARG} is required" >&2
print_usage
exit 1
;;
esac
done
if [ -z ${VERSION} ]; then
echo "Version is not specified" >&2
print_usage
exit 1
fi
podman build --tag oplpctools --build-arg VERSION=${VERSION} -f Dockerfile .
podman create --name oplpctools -t oplpctools:latest
podman cp --overwrite oplpctools:/oplpctools/oplpctools_linux_${VERSION}_amd64.tar.gz ./release/
podman rm oplpctools
podman image rm -f oplpctools:latest fedora:latest
podman system prune -f