Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

SHELL = /bin/sh

## shortcut to start stack, fully containerized, stable build
## Shortcut to start stack, fully containerized, stable build
.PHONY: up
up:
cd golang && \
Expand All @@ -12,7 +11,7 @@ down:
cd golang && \
make down

# shortcut to start stack with local development config
# Shortcut to start stack with local development config
.PHONY: upd
upd:
cd golang && \
Expand All @@ -26,36 +25,37 @@ downd:
.PHONY: dwd
dwd: downd

# shortcut for cli
# Shortcut for CLI
.PHONY: cli
cli:
cd golang/cmd/dyo && \
go run .

# Create dyrector.io offline installer bundle
.PHONY: bundle
bundle:
$(eval BUNDLEVER=$(or $(version),latest))
mv .env .env_bak || true
echo "DYO_VERSION=$(BUNDLEVER)" > .env
docker-compose --ansi=never pull 2> >(awk '!/level=warning/') >/dev/stdout
docker-compose --ansi=never pull
docker-compose config 2>/dev/null | yq -r '.services[].image' | sort | uniq | while read line ; do \
docker save $$line | gzip > "offline/$$(echo "$$line" | sed 's/\//\./g; s/\:/\_/g' | cut -d'.' -f3-).tgz" ; done
cp docker-compose.yaml offline/
cp .env.example offline/
zip -r dyrectorio-offline-bundle-$(BUNDLEVER).zip offline
mv .env_bak .env || true

## Compile the all grpc files
## Compile the all gRPC files
.PHONY: protogen
protogen:| proto-agent proto-crux

## Generate agent grpc files
## Generate agent gRPC files
.PHONY: go-lint
go-lint:
MSYS_NO_PATHCONV=1 docker run --rm -u ${UID}:${GID} -v ${PWD}:/usr/work ghcr.io/dyrector-io/dyrectorio/alpine-proto:3.17-4 ash -c "\
cd golang && make lint"

## Generate agent grpc files
## Generate agent gRPC files
.PHONY: proto-agent
proto-agent:
MSYS_NO_PATHCONV=1 docker run --rm -u ${UID}:${GID} -v ${PWD}:/usr/work ghcr.io/dyrector-io/dyrectorio/alpine-proto:3.17-4 ash -c "\
Expand Down Expand Up @@ -93,9 +93,10 @@ build-proto-image:
branch-check:
@branch=$$(git rev-parse --abbrev-ref HEAD); \
if [ "$$branch" = "main" ] || [ "$$branch" = "develop" ]; then \
echo main; \
echo "You are on main / develop branch."; \
else \
echo "!!! WARNING: You are not on the main or develop branch!"; \
echo "!!!WARNING: You are not on the main or develop branch!"; \
exit 1; \
fi

# use on the branch to-release (develop or main for hotfixes)
Expand Down