JeninsCT fixed unable getting latest go version

This commit is contained in:
2022-06-30 02:59:01 +02:00
parent af109789c6
commit f9650bdeea

View File

@@ -27,7 +27,7 @@ InstalledPlugins=$(java -jar /opt/jenkins-cli.jar -s http://localhost:8080/ -web
#Update configuratiopn before putting them in place
sed -i -e 's/LocaleVersion/'$(printf "%s" "${InstalledPlugins%x}" | grep '^locale ' | awk '{ print $NF}')'/g' /opt/Setup/Configs/locale.xml
sed -i -e 's/DarkThemeVersion/'$(printf "%s" "${InstalledPlugins%x}" | grep '^dark-theme ' | awk '{ print $NF}')'/g' -e 's/ThemeManagerVersion/'$(printf "%s" "${InstalledPlugins%x}" | grep '^theme-manager ' | awk '{ print $NF}')'/g' /opt/Setup/Configs/io.jenkins.plugins.thememanager.ThemeManagerPageDecorator.xml
sed -i -e 's/GoPluginVersion/'$(printf "%s" "${InstalledPlugins%x}" | grep '^golang ' | awk '{ print $NF}')'/g' -e 's/GoVersion/'$(curl -s https://golang.org/VERSION?m=text |sed 's/go//g')'/g' /opt/Setup/Configs/org.jenkinsci.plugins.golang.GolangBuildWrapper.xml
sed -i -e 's/GoPluginVersion/'$(printf "%s" "${InstalledPlugins%x}" | grep '^golang ' | awk '{ print $NF}')'/g' -e 's/GoVersion/'$(curl -Ls https://go.dev/VERSION?m=text |sed 's/go//g')'/g' /opt/Setup/Configs/org.jenkinsci.plugins.golang.GolangBuildWrapper.xml
mv -t /var/lib/jenkins /opt/Setup/Configs/locale.xml /opt/Setup/Configs/io.jenkins.plugins.thememanager.ThemeManagerPageDecorator.xml /opt/Setup/Configs/org.jenkinsci.plugins.golang.GolangBuildWrapper.xml
#Restart