Update Drone CI configuration and Makefile to remove legacy worker sources and add build target for worker

- Updated `.drone.yml` to remove lingering legacy worker source files after git deletion, ensuring a clean build environment.
- Modified `Makefile` to include a new `build-worker` target that removes deprecated scraper and queue source files, streamlining the worker build process.

This change enhances the build process by eliminating outdated components and ensuring that the worker is built without legacy dependencies.
This commit is contained in:
Mazyar
2026-06-09 11:29:29 +03:30
parent 35892d5bc0
commit 4f05516fc2
2 changed files with 11 additions and 1 deletions
+2
View File
@@ -37,6 +37,8 @@ steps:
- go env - go env
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./artifacts/go/bin/web ./cmd/web/main.go - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./artifacts/go/bin/web ./cmd/web/main.go
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./artifacts/go/bin/scraper ./cmd/scraper/main.go - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./artifacts/go/bin/scraper ./cmd/scraper/main.go
# Remove legacy worker sources if they linger on disk after git deleted them (AI pipeline owns scraping now).
- rm -f cmd/worker/workers/scraper.go cmd/worker/workers/scraper_consumer.go cmd/worker/workers/queue_producer.go
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./artifacts/go/bin/worker ./cmd/worker/main.go - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./artifacts/go/bin/worker ./cmd/worker/main.go
- cp -r ./cmd/web/docs ./artifacts/go/bin/docs - cp -r ./cmd/web/docs ./artifacts/go/bin/docs
- cp -r ./cmd/web/assets ./artifacts/go/bin/assets - cp -r ./cmd/web/assets ./artifacts/go/bin/assets
+9 -1
View File
@@ -1,6 +1,6 @@
# Tender Management Backend Makefile # Tender Management Backend Makefile
.PHONY: help build run test clean docker-build docker-run docs run-docs .PHONY: help build build-worker run test clean docker-build docker-run docs run-docs
# Default target # Default target
help: help:
@@ -24,6 +24,14 @@ build:
@go build -o bin/web ./cmd/web @go build -o bin/web ./cmd/web
@echo "Build completed successfully!" @echo "Build completed successfully!"
# Build the worker (drops legacy scraper/queue sources removed from git)
build-worker:
@echo "Building worker..."
@rm -f cmd/worker/workers/scraper.go cmd/worker/workers/scraper_consumer.go cmd/worker/workers/queue_producer.go
@mkdir -p bin
@go build -o bin/worker ./cmd/worker
@echo "Worker build completed successfully!"
# Build for macOS (Intel) # Build for macOS (Intel)
build-mac: build-mac:
@echo "Building web server for macOS (Intel)..." @echo "Building web server for macOS (Intel)..."