mirror of
https://gitee.com/BDWare/ypk-deploy-tool
synced 2025-01-10 09:54:01 +00:00
15 lines
477 B
Bash
15 lines
477 B
Bash
|
#!/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
|