Last active
April 14, 2023 06:35
-
-
Save AleksdemSA/f9dd6941fbdbadc71ef3451d5621a412 to your computer and use it in GitHub Desktop.
update gitea
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| GITEA_FOLDER='/opt/gitea' | |
| RELEASE=`curl --silent "https://api.github.com/repos/go-gitea/gitea/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed -E 's/v//g'` | |
| printf "\033[92m" | |
| printf "\nRelease Number: $RELEASE \n" | |
| printf "\033[91m" | |
| printf "\nsystemctl stop gitea.service\n" | |
| printf "\033[0m" | |
| systemctl stop gitea | |
| wget https://github.com/go-gitea/gitea/releases/download/v$RELEASE/gitea-$RELEASE-linux-amd64 -O $GITEA_FOLDER/gitea | |
| chmod u+x $GITEA_FOLDER/gitea | |
| printf "\033[92m" | |
| echo "starting gitea.service..." | |
| printf "\033[0m" | |
| systemctl start gitea |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment