Skip to content

Commit

Permalink
Modified Makefile: Excluded cmd/mobile from test execution, changed G…
Browse files Browse the repository at this point in the history
…UI target to build using cmd/gui/main.go, and updated the commit accordingly.
  • Loading branch information
DanielcoderX committed Sep 4, 2023
1 parent 5b44c3b commit 7260469
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
18 changes: 13 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,39 @@ BUILD_DIR = build/bin
# Directories to create
DIRS := $(BUILD_DIR)

# Clean build artifacts and run tests
all: clean build test

# Create necessary directories
create_dirs:
@mkdir -p $(DIRS)

# Clean build artifacts
clean:
@echo "Cleaning..."
rm -rf $(DIRS)

# Build the CLI version
build: create_dirs
@echo "Building Cli Version..."
@echo "Building CLI Version..."
CGO_ENABLED=0 go build -trimpath -o $(BUILD_DIR)/bepass cmd/cli/main.go

# Build the CLI release version (stripped and with ldflags)
release: create_dirs
@echo "Building Cli Release Version..."
@echo "Building CLI Release Version..."
CGO_ENABLED=0 go build -ldflags '-s -w' -trimpath -o $(BUILD_DIR)/bepass cmd/cli/main.go

# Build the GUI version
gui: create_dirs
@echo "Building GUI version..."
go build -trimpath -o $(BUILD_DIR)/bepass-gui cmd/gui/gui.go
go build -trimpath -o $(BUILD_DIR)/bepass-gui cmd/gui/main.go

# Build the GUI release version (stripped and with ldflags)
gui-release: create_dirs
@echo "Building GUI Release Version..."
go build -ldflags '-s -w' -trimpath -o $(BUILD_DIR)/bepass-gui cmd/gui/gui.go
go build -ldflags '-s -w' -trimpath -o $(BUILD_DIR)/bepass-gui cmd/gui/main.go

# Build and run tests
test: build
@echo "Running tests..."
# Later's some test cases would be added
go test $(shell go list ./... | grep -vE 'cmd/mobile')
1 change: 0 additions & 1 deletion cmd/gui/advanced/main.go

This file was deleted.

File renamed without changes.

0 comments on commit 7260469

Please sign in to comment.