[ github-action ] 新增Agent版本控制 - 2

This commit is contained in:
zeaslity
2023-02-08 15:36:30 +08:00
parent b97a74bbbd
commit 99d519bb8c

View File

@@ -129,13 +129,12 @@ jobs:
cd ./agent/target cd ./agent/target
ls ls
echo "start to change timezone to Asia/Shanghai" echo "start to change timezone to Asia/Shanghai"
timedatectl set-timezone Asia/Shanghai && timedatectl set-ntp true # timedatectl set-timezone Asia/Shanghai && timedatectl set-ntp true
echo "current time is $(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g")" echo "current time is $(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g")"
echo "current time is $(date)" echo "current time is $(date)"
echo "start to copy target jar" echo "start to copy target jar"
echo "AGENT_VERSION=$(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g")" >> echo "AGENT_VERSION=$(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g")" >> $GITHUB_ENV
$GITHUB_ENV
cp ./agent-*.jar ./octopus-agent-${{ env.AGENT_VERSION }}.jar cp ./agent-*.jar ./octopus-agent-${{ env.AGENT_VERSION }}.jar