-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
5 changed files
with
97 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Bump these on release, and for now manually update the deployment files: | ||
# docker-compose.yml, stack.yml and package.json | ||
VERSION_MAJOR ?= 0 | ||
VERSION_MINOR ?= 4 | ||
BUILD_NUMBER ?= 0 | ||
PATCH_STRING ?= | ||
|
||
VERSION_STRING = $(VERSION_MAJOR).$(VERSION_MINOR).$(BUILD_NUMBER)$(PATCH_STRING) | ||
|
||
IMAGE_TAG ?= $(VERSION_MAJOR).$(VERSION_MINOR).$(BUILD_NUMBER) | ||
REGISTRY_USER ?= rajchaudhuri | ||
|
||
.PHONY: all | ||
all: client server | ||
|
||
.PHONY: public | ||
public: | ||
cp -r public/* out/ | ||
|
||
out/js/client.js: client/*.js | ||
npm run build-client-release | ||
|
||
.PHONY: client | ||
client: public out/js/client.js | ||
|
||
.PHONY: client-debug | ||
client-debug: public client/*.js | ||
npm run build-client-debug | ||
|
||
out/voxel-dockerserver: server/*.go | ||
CGO_ENABLED='0' go build -o out/voxel-dockerserver -ldflags "-X 'main.version=$(VERSION_STRING)'" server/*.go | ||
|
||
.PHONY: server | ||
server: out/voxel-dockerserver | ||
|
||
.PHONY: debug | ||
debug: public client-debug server | ||
|
||
.PHONY: build-docker | ||
build-docker: | ||
docker image build -t $(REGISTRY_USER)/voxel-dockerclient:$(VERSION_STRING) -f Dockerfile . | ||
|
||
.PHONY: run-docker | ||
run-docker: build-docker | ||
docker container run --rm --mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock --publish 8080:8080 $(REGISTRY_USER)/voxel-dockerclient:$(VERSION_STRING) | ||
|
||
.PHONY: clean-docker | ||
clean-docker: | ||
docker image rm $(REGISTRY_USER)/voxel-dockerclient:$(VERSION_STRING) | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf out/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters