2022-04-29 10:13:57 +00:00
|
|
|
.PHONY: dist api
|
2022-04-23 19:47:39 +00:00
|
|
|
|
|
|
|
# Build distributable binaries.
|
|
|
|
dist:
|
2022-07-21 10:00:47 +00:00
|
|
|
docker-compose run --rm --no-deps chirpstack 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
|
2022-09-28 08:09:51 +00:00
|
|
|
cd api && make
|
|
|
|
make build-ui
|
2022-07-28 08:02:54 +00:00
|
|
|
make test
|
|
|
|
git add .
|
|
|
|
git commit -v -m "Bump version to $(VERSION)"
|
|
|
|
git tag -a v$(VERSION) -m "v$(VERSION)"
|
|
|
|
git tag -a api/go/v$(VERSION) -m "api/go/v$(VERSION)"
|
2022-04-29 10:13:57 +00:00
|
|
|
|
|
|
|
api: version
|
|
|
|
cd api && make
|
|
|
|
|
2022-04-06 20:18:32 +00:00
|
|
|
# Builds the UI.
|
|
|
|
build-ui:
|
2022-07-21 10:00:47 +00:00
|
|
|
docker-compose run --rm --no-deps chirpstack-ui make build
|
2022-04-06 20:18:32 +00:00
|
|
|
|
|
|
|
# Enters the devshell for ChirpStack development.
|
|
|
|
devshell:
|
2022-09-01 13:50:46 +00:00
|
|
|
docker-compose run --rm --service-ports --name chirpstack chirpstack bash
|
2022-04-06 20:18:32 +00:00
|
|
|
|
|
|
|
# Enters the devshell for ChirpStack UI development.
|
|
|
|
devshell-ui:
|
2022-09-01 13:50:46 +00:00
|
|
|
docker-compose run --rm --service-ports --name chirpstack-ui chirpstack-ui bash
|
2022-04-06 20:18:32 +00:00
|
|
|
|
|
|
|
# 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-07-21 10:00:47 +00:00
|
|
|
docker-compose build chirpstack
|
2022-04-06 20:18:32 +00:00
|
|
|
docker-compose build chirpstack-ui
|