Skip to content

Commit

Permalink
fix: incorect zip file
Browse files Browse the repository at this point in the history
  • Loading branch information
clement2026 committed Sep 6, 2024
1 parent 06ecdc1 commit 37dbbdf
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ jobs:
uses: arduino/setup-protoc@v3

- name: Unit testing
run: make protoc && make test

- name: Build binary
run: make build
run: make test

- name: Upload binary
uses: actions/upload-artifact@v4
Expand All @@ -60,13 +57,6 @@ jobs:
compression-level: 9
retention-days: 10

- name: E2E testing with binary
run: make test-e2e

- name: Build binary for release
run: make clean && make release

- name: E2E testing with binary for release
run: make test-e2e

- name: E2E testing
run: make clean test-e2e

44 changes: 27 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,46 @@ RESET := \033[0m
define print_step
@echo "$(GREEN)===== $(1) =====$(RESET)"
endef
.PHONY: build

all: protoc build
.PHONY: protoc build release test test-e2e build-for-release

all: build
$(call print_step, Done)

release: protoc build-for-release
release: build-for-release
$(call print_step, Done)

protoc:
$(call print_step, Generating protobuf files)
$(MAKE) -f go.mk protoc
$(MAKE) -C ts protoc

test:
$(call print_step, Testing)
$(MAKE) -f go.mk test
$(MAKE) -C ts test

test-e2e:
$(call print_step, Testing e2e)
$(MAKE) -f go.mk test-e2e

build:
build: protoc
$(call print_step, Building)
$(MAKE) -C ts build
$(MAKE) copy
$(MAKE) -f go.mk build

build-for-release:
build-for-release: protoc
$(call print_step, Build for releasing)
$(MAKE) -C ts build
$(MAKE) copy
$(MAKE) zip
$(MAKE) -f go.mk build-for-release

test: build
$(call print_step, Testing)
$(MAKE) -f go.mk test
$(MAKE) -C ts test

test-e2e: build
$(call print_step, Testing e2e)
$(MAKE) -f go.mk test-e2e
$(MAKE) clean
$(MAKE) protoc build-for-release
$(call print_step, Testing e2e again)
$(MAKE) -f go.mk test-e2e

clean:
$(call print_step, Cleaning)
$(MAKE) -f go.mk clean
Expand All @@ -51,14 +56,19 @@ clean:
fi

copy:
$(call print_step, Removing static files from go)
$(call print_step, Removing static files)
@if [ -d "./assets/web/html" ]; then \
rm -rf ./assets/web/html; \
fi
$(call print_step, Copying static files to go)
$(call print_step, Copying static files)
cp -r ts/out assets/web/html

zip:
rm assets/web/html.zip
$(call print_step, Removing zip)
@if [ -d "rm ./assets/web/html.zip" ]; then \
rm -rf rm ./assets/web/html.zip; \
fi

$(call print_step, Copying zip)
# this won't work as it creates ts/out entry in the .zip: zip -r assets/web/html.zip ts/out/*
cd ts/out && zip -r ../../assets/web/html.zip ./*
Binary file modified assets/web/html.zip
Binary file not shown.

0 comments on commit 37dbbdf

Please sign in to comment.