mirror of
https://github.com/minoplhy/scriptbox.git
synced 2024-12-05 01:46:57 +00:00
Gitea-ui-customized : update to be compatible with Gitea 1.18
build_gitea : Support git tag and build a completely usable binary
This commit is contained in:
parent
8f9d3289f9
commit
045603d65e
File diff suppressed because it is too large
Load Diff
@ -4,9 +4,11 @@ DESTINATION=~/gitea-binaries/
|
||||
mkdir -p $DESTINATION
|
||||
cd $MAKE_DIR
|
||||
|
||||
GIT_TAG=$1
|
||||
|
||||
# NodeJS
|
||||
|
||||
VERSION=v19.2.0
|
||||
VERSION=v19.4.0
|
||||
DISTRO=linux-x64
|
||||
|
||||
wget https://nodejs.org/dist/$VERSION/node-$VERSION-$DISTRO.tar.xz
|
||||
@ -17,7 +19,7 @@ export PATH=/usr/local/lib/nodejs/node-$VERSION-$DISTRO/bin:$PATH
|
||||
|
||||
# Golang
|
||||
|
||||
GO_VERSION=1.19.3
|
||||
GO_VERSION=1.19.5
|
||||
|
||||
sudo unlink /usr/bin/go
|
||||
wget https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz
|
||||
@ -31,10 +33,26 @@ sudo apt-get update && sudo apt-get install make
|
||||
|
||||
# Gitea
|
||||
|
||||
git clone --depth=1 https://github.com/go-gitea/gitea
|
||||
# GIT_TAG=
|
||||
# specify the tag which gitea will build on
|
||||
|
||||
git clone https://github.com/go-gitea/gitea
|
||||
cd gitea
|
||||
LDFLAGS="-X \"code.gitea.io/gitea/modules/setting.AppWorkPath=/var/lib/gitea/\" -X \"code.gitea.io/gitea/modules/setting.CustomConf=/etc/gitea/app.ini\"" GOOS=linux GOARCH=amd64 make build
|
||||
|
||||
if [[ -n $GIT_TAG ]]
|
||||
then
|
||||
if git show-ref $GIT_TAG --quiet; then
|
||||
git checkout $GIT_TAG
|
||||
else
|
||||
echo "Variable GIT_TAG doesn't existed in the repo. fallback to default"
|
||||
fi
|
||||
else
|
||||
echo "GIT_TAG variable doesn't exist skipping"
|
||||
fi
|
||||
|
||||
LDFLAGS="-X \"code.gitea.io/gitea/modules/setting.AppWorkPath=/var/lib/gitea/\" -X \"code.gitea.io/gitea/modules/setting.CustomConf=/etc/gitea/app.ini\"" TAGS="bindata sqlite sqlite_unlock_notify" GOOS=linux GOARCH=amd64 make build
|
||||
mv gitea $DESTINATION/gitea
|
||||
|
||||
# Cleanup
|
||||
|
||||
rm -rf $MAKE_DIR
|
Loading…
Reference in New Issue
Block a user