mirror of
https://codeberg.org/Codeberg/avatars.git
synced 2023-08-10 21:12:50 +03:00
address issue #2
This commit is contained in:
parent
4f12f14411
commit
247db3a6f4
19
Makefile
19
Makefile
@ -6,7 +6,7 @@ export GOROOT := ${BUILDDIR}/go
|
||||
export GOPATH := ${BUILDDIR}/gitea
|
||||
export PATH := ${GOROOT}/bin:${GOPATH}/bin:${PATH}
|
||||
|
||||
GOTAR = go1.12.1.$(shell uname | tr [:upper:] [:lower:])-amd64.tar.gz
|
||||
GOTAR = go1.15.6.$(shell uname | tr [:upper:] [:lower:])-amd64.tar.gz
|
||||
ORIGIN = ssh://prlgc.com/git/gogs-gitea
|
||||
|
||||
TARGETS = ${GOPATH}/bin/avatar
|
||||
@ -16,20 +16,13 @@ all : ${TARGETS}
|
||||
${GOPATH}/bin/avatar : main.go ${GOROOT}/bin/go
|
||||
go build -o $@ $<
|
||||
|
||||
|
||||
deployment : deploy-avatar
|
||||
|
||||
deploy-avatar : ${GOPATH}/bin/avatar
|
||||
-ssh root@${HOSTNAME_FQDN} systemctl stop avatar
|
||||
scp $< root@${HOSTNAME_FQDN}:/usr/local/bin/
|
||||
scp -r etc/* root@${HOSTNAME_FQDN}:/etc/
|
||||
ssh root@${HOSTNAME_FQDN} systemctl daemon-reload
|
||||
ssh root@${HOSTNAME_FQDN} systemctl enable avatar
|
||||
ssh root@${HOSTNAME_FQDN} systemctl start avatar
|
||||
ssh root@${HOSTNAME_FQDN} systemctl status avatar
|
||||
${GOROOT}/bin/go :
|
||||
mkdir -p ${GOROOT}/Downloads
|
||||
wget -c --no-verbose --directory-prefix=${GOROOT}/Downloads https://dl.google.com/go/${GOTAR}
|
||||
tar xfz ${GOROOT}/Downloads/${GOTAR} -C ${BUILDDIR}
|
||||
|
||||
clean :
|
||||
${MAKE} -C ${GOPATH}/src/code.gitea.io/gitea clean
|
||||
rm -rf ${TARGETS}
|
||||
|
||||
realclean :
|
||||
rm -rf ${BUILDDIR}
|
||||
|
14
README.md
Normal file
14
README.md
Normal file
@ -0,0 +1,14 @@
|
||||
# Golang port of DiceBear Avatars, which in turn were inspired by 8biticon avatars
|
||||
|
||||
## Build & Run
|
||||
|
||||
```shell
|
||||
# will build the binary into ${BUILDDIR}. The golang compiler is fetched and installed into $PWD/gitea/bin/
|
||||
make BUILDDIR=$PWD
|
||||
# Create a random avatar and write it to /tmp/avatar.svg
|
||||
$PWD/gitea/bin/avatar my-special-seed-string > /tmp/avatar.svg
|
||||
# Open SVG file with default image viewer
|
||||
xdg-open /tmp/avatar.svg
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user