mirror of
https://gitee.com/BDWare/ypk-deploy-tool
synced 2025-01-09 17:34:02 +00:00
15 lines
477 B
Bash
Executable File
15 lines
477 B
Bash
Executable File
#!/bin/bash
|
|
|
|
version=$(awk '/version "[0-9]/ { sub(/[^"]*"/,"") ; sub(/".*$/,""); print $0 } ' build.gradle)
|
|
echo version extract from build.gradle '-->' $version
|
|
if [ $# -gt 0 ]; then
|
|
time=$1
|
|
else
|
|
time=$(date "+%Y-%m-%d")
|
|
fi
|
|
echo time is $time
|
|
|
|
cd ./docker/
|
|
awk ' {gsub(/version=\".*\"/,"version=\"'$version'\""); print $0; } ' Dockerfile >Dockerfile.2
|
|
awk ' {gsub(/release-date=\".*\"/,"release-date=\"'$time'\""); print $0; } ' Dockerfile.2 >Dockerfile
|
|
rm Dockerfile.2 |