2022-04-29 10:13:57 +00:00
|
|
|
.PHONY: dist api
|
2022-04-23 19:47:39 +00:00
|
|
|
|
2022-04-06 20:18:32 +00:00
|
|
|
# Builds a debug / development binary.
|
2022-04-18 20:19:24 +00:00
|
|
|
build-debug:
|
2022-04-06 20:18:32 +00:00
|
|
|
docker-compose run --rm chirpstack make debug
|
|
|
|
|
2022-04-18 20:19:24 +00:00
|
|
|
# Builds a release binary.
|
|
|
|
build-release:
|
2022-04-06 20:18:32 +00:00
|
|
|
docker-compose run --rm chirpstack make release
|
|
|
|
|
2022-04-23 19:47:39 +00:00
|
|
|
# Build distributable binaries.
|
|
|
|
dist:
|
2022-05-02 14:14:29 +00:00
|
|
|
# The pull is needed as else the specified platform is not respected.
|
|
|
|
docker-compose pull chirpstack-build-amd64 && docker-compose run --rm chirpstack-build-amd64 make dist
|
|
|
|
docker-compose pull chirpstack-build-arm64 && docker-compose run --rm chirpstack-build-arm64 make dist
|
2022-04-23 10:31:54 +00:00
|
|
|
|
2022-04-29 10:13:57 +00:00
|
|
|
# Set the versions
|
|
|
|
version:
|
|
|
|
test -n "$(VERSION)"
|
|
|
|
sed -i 's/^version.*/version = "$(VERSION)"/g' ./chirpstack/Cargo.toml
|
|
|
|
sed -i 's/^version.*/version = "$(VERSION)"/g' ./backend/Cargo.toml
|
|
|
|
sed -i 's/^version.*/version = "$(VERSION)"/g' ./lrwn/Cargo.toml
|
|
|
|
sed -i 's/"version.*/"version": "$(VERSION)",/g' ./ui/package.json
|
|
|
|
sed -i 's/"version.*/"version": "$(VERSION)",/g' ./api/grpc-web/package.json
|
|
|
|
sed -i 's/"version.*/"version": "$(VERSION)",/g' ./api/js/package.json
|
|
|
|
sed -i 's/version.*/version = "$(VERSION)",/g' ./api/python/src/setup.py
|
|
|
|
sed -i 's/^version.*/version = "$(VERSION)"/g' ./api/rust/Cargo.toml
|
|
|
|
|
|
|
|
api: version
|
|
|
|
cd api && make
|
|
|
|
|
2022-04-06 20:18:32 +00:00
|
|
|
# Builds the UI.
|
|
|
|
build-ui:
|
|
|
|
docker-compose run --rm chirpstack-ui make build
|
|
|
|
|
|
|
|
# Enters the devshell for ChirpStack development.
|
|
|
|
devshell:
|
|
|
|
docker-compose run --rm --service-ports chirpstack bash
|
|
|
|
|
|
|
|
# Enters the devshell for ChirpStack UI development.
|
|
|
|
devshell-ui:
|
|
|
|
docker-compose run --rm --service-ports chirpstack-ui bash
|
|
|
|
|
|
|
|
# Runs the tests
|
|
|
|
test:
|
|
|
|
docker-compose run --rm chirpstack make test
|
|
|
|
docker-compose run --rm chirpstack make test-lrwn
|
|
|
|
|
|
|
|
# Starts the ChirpStack server (for testing only).
|
|
|
|
test-server: build-ui
|
|
|
|
docker-compose run --rm --service-ports chirpstack make test-server
|
|
|
|
|
|
|
|
# Update the Docker development images
|
|
|
|
update-images:
|
2022-04-18 20:19:24 +00:00
|
|
|
docker-compose pull chirpstack
|
2022-04-06 20:18:32 +00:00
|
|
|
docker-compose build chirpstack-ui
|