-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (27 loc) · 1.05 KB
/
Makefile
File metadata and controls
33 lines (27 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
TEST__USER_ID := 728871946456137770
CDN_PATH := /silverpelt/cdn/ibl
all:
CGO_ENABLED=0 go build -v
systemctl reload popplio-staging
build-cdocs:
cd docs/cdocs && FRONTEND_URL=https://botlist.site npm run build && cd ..
tests:
CGO_ENABLED=0 go test -v -coverprofile=coverage.out ./...
ts:
rm -rvf $(CDN_PATH)/dev/bindings/popplio
~/go/bin/tygo generate
# Copy over go types
mkdir $(CDN_PATH)/dev/bindings/popplio/go
cp -rf types $(CDN_PATH)/dev/bindings/popplio/go
# Patch to change package name to 'popltypes'
sed -i 's:package types:package popltypes:g' $(CDN_PATH)/dev/bindings/popplio/go/types/*
# Add enums
STAGING_API=true ibl genenums
promoteprod:
rm -rf ../prod2
cd .. && cp -rf staging prod2
echo "prod" > ../prod2/config/current-env
cd ../prod2 && make && rm -rf ../prod && mv -vf ../prod2 ../prod && systemctl restart popplio-prod
cd ../prod && make ts
# Git push to "current-prod" branch
cd ../prod && git branch current-prod && git add -v . && git commit -m "Promote staging to prod" && git push -u origin HEAD:current-prod --force