feat: automatic image version
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
# Download base image debian jessie
|
||||
FROM python:slim
|
||||
|
||||
ARG replication_version=0.0.21a15
|
||||
ARG version=0.1.0
|
||||
|
||||
# Infos
|
||||
LABEL maintainer="Swann Martinez"
|
||||
LABEL version="0.1.0"
|
||||
LABEL version=$version
|
||||
LABEL description="Blender multi-user addon \
|
||||
dedicated server image."
|
||||
|
||||
ARG version=0.0.21a15
|
||||
|
||||
# Argument
|
||||
ENV password='admin'
|
||||
ENV port=5555
|
||||
@@ -17,7 +18,7 @@ ENV log_level=INFO
|
||||
ENV log_file="multiuser_server.log"
|
||||
|
||||
#Install replication
|
||||
RUN pip install replication==$version
|
||||
RUN pip install replication==$replication_version
|
||||
|
||||
# Run the server with parameters
|
||||
CMD replication.serve -pwd ${password} -p ${port} -t ${timeout} -l ${log_level} -lf ${log_file}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
import re
|
||||
|
||||
init_py = open("multi_user/__init__.py").read()
|
||||
version = re.search("\d+, \d+, \d+", init_py).group(0)
|
||||
digits = version.split(',')
|
||||
print('.'.join(digits).replace(" ",""))
|
||||
Reference in New Issue
Block a user