GraphQL API and utilities for the rpdata project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

34 lines
1.3 KiB

INSTALL_PATH ?= ./build
CGO_ENABLED ?= 0
# Build all the things
build: build-server build-tools
# Clean up previous builds, vendor directory and generated files
clean:
rm -rf ./vendor ./schema/bindata.go $(INSTALL_PATH)
# Prepare the dev environment
setup:
dep ensure
go generate ./...
go test ./...
# Build the server (enough for a container/minimal install)
build-server: setup
mkdir -p $(INSTALL_PATH)/usr/bin
mkdir -p $(INSTALL_PATH)/etc/aiterp
cp ./config.example.json $(INSTALL_PATH)/etc/aiterp/rpdata.json
go build -ldflags="-s -w" -o $(INSTALL_PATH)/usr/bin/rpdata-graphiql ./cmd/rpdata-graphiql
# Build the tools needed to port data over
build-tools: build-server
go build -ldflags="-s -w" -o $(INSTALL_PATH)/usr/bin/rpdata-lb2charimport ./cmd/rpdata-lb2charimport
go build -ldflags="-s -w" -o $(INSTALL_PATH)/usr/bin/rpdata-lb2logimport ./cmd/rpdata-lb2logimport
go build -ldflags="-s -w" -o $(INSTALL_PATH)/usr/bin/rpdata-wikifileimport ./cmd/rpdata-wikifileimport
go build -ldflags="-s -w" -o $(INSTALL_PATH)/usr/bin/rpdata-ensurechannels ./cmd/rpdata-ensurechannels
go build -ldflags="-s -w" -o $(INSTALL_PATH)/usr/bin/rpdata-as2storyimport ./cmd/rpdata-ensurechannels
# Install locally (requires access to /usr/bin, hence no dependency on build)
install:
cp $(INSTALL_PATH)/usr/bin/* /usr/local/bin/