Skip to content

Commit 46bc8f4

Browse files
committed
Add auto version update
1 parent ca7be07 commit 46bc8f4

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

.github/workflows/get-latest-agent-version.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
- name: Commit latest release version
1818
if: steps.git-check.outputs.modified == 'true'
1919
run: |
20+
./update-latest-agent-version.sh
2021
git config --global user.name 'CodeZ.one Bot'
2122
git config --global user.email ' [email protected]'
2223
git commit -am "Update azure devops agent version"

latest-agent-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.166.4
1+
2.164.7

update-latest-agent-version.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
set -e
3+
4+
latest=$(cat ./latest-agent-version)
5+
6+
shopt -s globstar
7+
for file in ./linux/**/releases; do
8+
# overwrite target
9+
echo "$latest" > $file
10+
# appent to target
11+
# echo "$latest" > $file
12+
done
13+
14+
# Write the latest version number to the latest tag
15+
sed -i -E "s/[0-9]*\.[0-9]*\.[0-9]*/$latest/g" ./linux/latest.tag

0 commit comments

Comments
 (0)