+9
-1
@@ -14,7 +14,15 @@ pipeline:
|
|||||||
- go generate ./...
|
- go generate ./...
|
||||||
- mkdir /output
|
- mkdir /output
|
||||||
- go build -a -installsuffix cgo -ldflags="-s -w" -o /output/${CMD} ./cmd/${CMD}
|
- go build -a -installsuffix cgo -ldflags="-s -w" -o /output/${CMD} ./cmd/${CMD}
|
||||||
|
s3:
|
||||||
|
image: plugins/s3
|
||||||
|
bucket: aiterp
|
||||||
|
source: output/*
|
||||||
|
target: /build/rpdata/${DRONE_BUILD_NUMBER}-${DRONE_COMMIT}/
|
||||||
|
path_style: true
|
||||||
|
endpoint: https://ams3.digitaloceanspaces.com
|
||||||
|
secret_key: $${SPACE_SECRET_KEY}
|
||||||
|
access_key: $${SPACE_ACCESS_KEY}
|
||||||
matrix:
|
matrix:
|
||||||
CMD:
|
CMD:
|
||||||
- rpdata-graphiql
|
- rpdata-graphiql
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
INSTALL_PATH ?= ./build
|
|
||||||
|
|
||||||
# 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
|
|
||||||
CGO_ENABLED=0 go build -a -installsuffix cgo -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
|
|
||||||
CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags="-s -w" -o $(INSTALL_PATH)/usr/bin/rpdata-lb2charimport ./cmd/rpdata-lb2charimport
|
|
||||||
CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags="-s -w" -o $(INSTALL_PATH)/usr/bin/rpdata-lb2logimport ./cmd/rpdata-lb2logimport
|
|
||||||
CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags="-s -w" -o $(INSTALL_PATH)/usr/bin/rpdata-wikifileimport ./cmd/rpdata-wikifileimport
|
|
||||||
CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags="-s -w" -o $(INSTALL_PATH)/usr/bin/rpdata-ensurechannels ./cmd/rpdata-ensurechannels
|
|
||||||
CGO_ENABLED=0 go build -a -installsuffix cgo -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/
|
|
||||||
Reference in New Issue
Block a user