build_gitea : init
This commit is contained in:
parent
f094587b5d
commit
d279911de6
5
build_gitea/Linux/build.sh
Normal file
5
build_gitea/Linux/build.sh
Normal file
@ -0,0 +1,5 @@
|
||||
git clone --depth=1 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
|
||||
mv gitea $DESTINATION/gitea
|
||||
rm -rf $MAKE_DIR
|
32
build_gitea/Linux/prebuild.sh
Normal file
32
build_gitea/Linux/prebuild.sh
Normal file
@ -0,0 +1,32 @@
|
||||
MAKE_DIR=$(mktemp -d)
|
||||
DESTINATION=~/gitea-binaries/
|
||||
|
||||
mkdir -p $DESTINATION
|
||||
cd $MAKE_DIR
|
||||
|
||||
# NodeJS
|
||||
|
||||
VERSION=v19.2.0
|
||||
DISTRO=linux-x64
|
||||
|
||||
wget https://nodejs.org/dist/$VERSION/node-$VERSION-$DISTRO.tar.xz
|
||||
sudo mkdir -p /usr/local/lib/nodejs
|
||||
sudo tar -xJvf node-$VERSION-$DISTRO.tar.xz -C /usr/local/lib/nodejs
|
||||
export PATH=/usr/local/lib/nodejs/node-$VERSION-$DISTRO/bin:$PATH
|
||||
. ~/.profile
|
||||
|
||||
# Golang
|
||||
|
||||
GO_VERSION=1.19.3
|
||||
|
||||
sudo unlink /usr/bin/go
|
||||
wget https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz
|
||||
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go$GO_VERSION.linux-amd64.tar.gz
|
||||
export PATH=$PATH:/usr/local/go/bin
|
||||
sudo ln -s /usr/local/go/bin /usr/bin/go
|
||||
|
||||
# Make
|
||||
|
||||
sudo apt-get update && sudo apt-get install make
|
||||
|
||||
curl https://github.com/minoplhy/scriptbox/raw/main/build_gitea/Linux/build.sh | sudo bash
|
6
build_gitea/README.md
Normal file
6
build_gitea/README.md
Normal file
@ -0,0 +1,6 @@
|
||||
# Build Gitea
|
||||
It's simple, Build Gitea and done. nothing special.
|
||||
|
||||
```shell
|
||||
curl https://github.com/minoplhy/scriptbox/raw/main/build_gitea/Linux/prebuild.sh | sudo bash
|
||||
```
|
Loading…
Reference in New Issue
Block a user