build_gitea : merged script files
This commit is contained in:
parent
7a810ad0b5
commit
bc30f8c449
@ -1,5 +1,40 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
# Gitea
|
||||||
|
|
||||||
git clone --depth=1 https://github.com/go-gitea/gitea
|
git clone --depth=1 https://github.com/go-gitea/gitea
|
||||||
cd 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
|
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
|
mv gitea $DESTINATION/gitea
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
rm -rf $MAKE_DIR
|
rm -rf $MAKE_DIR
|
@ -1,32 +0,0 @@
|
|||||||
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 -L https://github.com/minoplhy/scriptbox/raw/main/build_gitea/Linux/build.sh | bash
|
|
19
build_gitea/Linux/systemd/gitea.service
Normal file
19
build_gitea/Linux/systemd/gitea.service
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Gitea (Git with a cup of tea)
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
RestartSec=30s
|
||||||
|
Type=simple
|
||||||
|
User=gitea
|
||||||
|
Group=gitea
|
||||||
|
WorkingDirectory=/var/lib/gitea/
|
||||||
|
ExecStart=/usr/bin/gitea web -c /etc/gitea/app.ini
|
||||||
|
Restart=on-failure
|
||||||
|
Environment="GITEA_WORK_DIR=/var/lib/gitea/"
|
||||||
|
EnvironmentFile=-/etc/default/gitea
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
# Stealed from https://gitlab.com/packaging/gitea/-/blob/master/.packaging/gitea.service
|
@ -2,5 +2,5 @@
|
|||||||
It's simple, Build Gitea and done. nothing special.
|
It's simple, Build Gitea and done. nothing special.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L https://github.com/minoplhy/scriptbox/raw/main/build_gitea/Linux/prebuild.sh | bash
|
curl -L https://github.com/minoplhy/scriptbox/raw/main/build_gitea/Linux/build.sh | bash
|
||||||
```
|
```
|
Loading…
Reference in New Issue
Block a user