Merge pull request #120 from overleaf/spd-prof-version

Use timestamp as version number for compiler
This commit is contained in:
Shane Kilkelly 2021-06-24 16:38:42 +01:00 committed by GitHub
commit ce506a8208

View file

@ -2,16 +2,18 @@
/opt/envsubst < /envsubst_template.json > /conf/runtime.json /opt/envsubst < /envsubst_template.json > /conf/runtime.json
VERSION=$(date +%y%m%d%H%M%S)
if [ "x$GIT_BRIDGE_JVM_ARGS" == "x" ]; then if [ "x$GIT_BRIDGE_JVM_ARGS" == "x" ]; then
GIT_BRIDGE_JVM_ARGS="-XX:+UseContainerSupport -XX:MaxRAMPercentage=50.0" GIT_BRIDGE_JVM_ARGS="-XX:+UseContainerSupport -XX:MaxRAMPercentage=50.0"
fi fi
if [ "$ENABLE_PROFILE_AGENT" == "true" ]; then if [ "$ENABLE_PROFILE_AGENT" == "true" ]; then
GIT_BRIDGE_JVM_ARGS="-agentpath:/opt/cprof/profiler_java_agent.so=-cprof_service=git-bridge,-cprof_service_version=1.0.0,-cprof_enable_heap_sampling=true ${GIT_BRIDGE_JVM_ARGS}" GIT_BRIDGE_JVM_ARGS="-agentpath:/opt/cprof/profiler_java_agent.so=-cprof_service=git-bridge,-cprof_service_version=${VERSION},-cprof_enable_heap_sampling=true ${GIT_BRIDGE_JVM_ARGS}"
fi fi
if [ "$ENABLE_DEBUG_AGENT" == "true" ]; then if [ "$ENABLE_DEBUG_AGENT" == "true" ]; then
GIT_BRIDGE_JVM_ARGS="-agentpath:/opt/cdbg/cdbg_java_agent.so -Dcom.google.cdbg.module=git-bridge -Dcom.google.cdbg.version=$(date +%y%m%d%H%M%S) ${GIT_BRIDGE_JVM_ARGS}" GIT_BRIDGE_JVM_ARGS="-agentpath:/opt/cdbg/cdbg_java_agent.so -Dcom.google.cdbg.module=git-bridge -Dcom.google.cdbg.version=$VERSION ${GIT_BRIDGE_JVM_ARGS}"
fi fi
exec java $GIT_BRIDGE_JVM_ARGS -jar /git-bridge.jar /conf/runtime.json exec java $GIT_BRIDGE_JVM_ARGS -jar /git-bridge.jar /conf/runtime.json