Makefile 14.7 KB
Newer Older
1
NAME ?= gitlab-runner
2
PACKAGE_NAME ?= $(NAME)
3
export VERSION := $(shell ./ci/version)
4
REVISION := $(shell git rev-parse --short=8 HEAD || echo unknown)
5
BRANCH := $(shell git show-ref | grep "$(REVISION)" | grep -v HEAD | awk '{print $$2}' | sed 's|refs/remotes/origin/||' | sed 's|refs/heads/||' | sort | head -n 1)
6
BUILT := $(shell date +%Y-%m-%dT%H:%M:%S%:z)
7
TESTFLAGS ?= -cover
8 9 10 11 12 13 14

LATEST_STABLE_TAG := $(shell git -c versionsort.prereleaseSuffix="-rc" -c versionsort.prereleaseSuffix="-RC" tag -l "v*.*.*" --sort=-v:refname | awk '!/rc/' | head -n 1)
export IS_LATEST :=
ifeq ($(shell git describe --exact-match --match $(LATEST_STABLE_TAG) >/dev/null 2>&1; echo $$?), 0)
export IS_LATEST := true
endif

15
PACKAGE_CLOUD ?= ayufan/gitlab-ci-multi-runner
16
PACKAGE_CLOUD_URL ?= https://packagecloud.io/
17
BUILD_PLATFORMS ?= -os '!netbsd' -os '!openbsd'
Kamil Trzciński's avatar
Kamil Trzciński committed
18
S3_UPLOAD_PATH ?= master
19
# Keep in sync with docs/install/linux-repository.md
20
DEB_PLATFORMS ?= debian/wheezy debian/jessie debian/stretch debian/buster \
21
    ubuntu/trusty ubuntu/xenial ubuntu/zesty ubuntu/artful \
22
    raspbian/wheezy raspbian/jessie raspbian/stretch raspbian/buster \
23
    linuxmint/qiana linuxmint/rebecca linuxmint/rafaela linuxmint/rosa linuxmint/sarah linuxmint/serena linuxmint/sonya
24
DEB_ARCHS ?= amd64 i386 armel armhf
25 26
RPM_PLATFORMS ?= el/6 el/7 \
    ol/6 ol/7 \
27
    fedora/25 fedora/26
Kamil Trzciński's avatar
Kamil Trzciński committed
28
RPM_ARCHS ?= x86_64 i686 arm armhf
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

PKG = gitlab.com/gitlab-org/$(PACKAGE_NAME)
COMMON_PACKAGE_NAMESPACE=$(PKG)/common

BUILD_DIR := $(CURDIR)
TARGET_DIR := $(BUILD_DIR)/out

ORIGINAL_GOPATH = $(shell echo $$GOPATH)
LOCAL_GOPATH := $(CURDIR)/.gopath
GOPATH_SETUP := $(LOCAL_GOPATH)/.ok
GOPATH_BIN := $(LOCAL_GOPATH)/bin
PKG_BUILD_DIR := $(LOCAL_GOPATH)/src/$(PKG)

export GOPATH = $(LOCAL_GOPATH)
export PATH := $(GOPATH_BIN):$(PATH)
44 45 46

# Packages in vendor/ are included in ./...
# https://github.com/golang/go/issues/11659
Alessio Caiazza's avatar
Alessio Caiazza committed
47
OUR_PACKAGES ?= $(subst _$(BUILD_DIR),$(PKG),$(shell go list ./... | grep -v '/vendor/'))
48

49 50
GO_LDFLAGS ?= -X $(COMMON_PACKAGE_NAMESPACE).NAME=$(PACKAGE_NAME) -X $(COMMON_PACKAGE_NAMESPACE).VERSION=$(VERSION) \
              -X $(COMMON_PACKAGE_NAMESPACE).REVISION=$(REVISION) -X $(COMMON_PACKAGE_NAMESPACE).BUILT=$(BUILT) \
51 52
              -X $(COMMON_PACKAGE_NAMESPACE).BRANCH=$(BRANCH) \
              -s -w
53
GO_FILES ?= $(shell find . -name '*.go' | grep -v './.gopath/')
54
export CGO_ENABLED ?= 0
55

56 57 58 59 60

# Development Tools
GOX = $(GOPATH_BIN)/gox
GOBINDATA = $(GOPATH_BIN)/go-bindata
MOCKERY = $(GOPATH_BIN)/mockery
61
DEVELOPMENT_TOOLS = $(GOX) $(GOBINDATA) $(MOCKERY)
62

63 64
MOCKERY_FLAGS = -note="This comment works around https://github.com/vektra/mockery/issues/155"

65 66
.PHONY: clean version mocks

67
all: deps build
Kamil Trzciński's avatar
Kamil Trzciński committed
68

Kamil Trzciński's avatar
Kamil Trzciński committed
69
help:
70
	# Commands:
71
	# make all => deps build
72
	# make version - show information about current version
73 74
	#
	# Development commands:
75
	# make install - install the version suitable for your OS as gitlab-runner
76 77 78
	# make docker - build docker dependencies
	#
	# Testing commands:
Kamil Trzciński's avatar
Kamil Trzciński committed
79
	# make test - run project tests
80
	# make codequality - run code quality analysis
81 82 83
	#
	# Deployment commands:
	# make deps - install all dependencies
Kamil Trzciński's avatar
Kamil Trzciński committed
84 85 86 87 88
	# make build - build project for all supported OSes
	# make package - package project using FPM
	# make packagecloud - send all packages to packagecloud
	# make packagecloud-yank - remove specific version from packagecloud

89
version:
90 91
	@echo Current version: $(VERSION)
	@echo Current revision: $(REVISION)
92 93
	@echo Current branch: $(BRANCH)
	@echo Build platforms: $(BUILD_PLATFORMS)
94 95
	@echo DEB platforms: $(DEB_PLATFORMS)
	@echo RPM platforms: $(RPM_PLATFORMS)
96
	@echo IS_LATEST: $(IS_LATEST)
97

98
deps: $(DEVELOPMENT_TOOLS)
Kamil Trzciński's avatar
Kamil Trzciński committed
99

100
codequality:
101
	./scripts/codequality analyze --dev
102

103
out/docker/prebuilt-x86_64.tar.xz: $(GO_FILES) $(GOX)
104 105 106
	# Create directory
	mkdir -p out/docker

107
ifneq (, $(shell docker info))
108 109 110 111
	# Building gitlab-runner-helper
	gox -osarch=linux/amd64 \
		-ldflags "$(GO_LDFLAGS)" \
		-output="dockerfiles/build/gitlab-runner-helper" \
112
		$(PKG)/apps/gitlab-runner-helper
113 114

	# Build docker images
115
	docker build -t gitlab/gitlab-runner-helper:x86_64-$(REVISION) -f dockerfiles/build/Dockerfile.x86_64 dockerfiles/build
116
	-docker rm -f gitlab-runner-prebuilt-x86_64-$(REVISION)
117
	docker create --name=gitlab-runner-prebuilt-x86_64-$(REVISION) gitlab/gitlab-runner-helper:x86_64-$(REVISION) /bin/sh
118 119
	docker export -o out/docker/prebuilt-x86_64.tar gitlab-runner-prebuilt-x86_64-$(REVISION)
	docker rm -f gitlab-runner-prebuilt-x86_64-$(REVISION)
120
	xz -f -9 out/docker/prebuilt-x86_64.tar
121 122 123 124
else
	$(warning =============================================)
	$(warning WARNING: downloading prebuilt docker images that will be embedded in gitlab-runner)
	$(warning WARNING: to use images compiled from your code install Docker Engine)
125
	$(warning WARNING: and remove out/docker/prebuilt-x86_64.tar.xz)
126
	$(warning =============================================)
127
	curl -o out/docker/prebuilt-x86_64.tar.xz \
128
		https://gitlab-runner-downloads.s3.amazonaws.com/master/docker/prebuilt-x86_64.tar.xz
129 130
endif

131
out/docker/prebuilt-arm.tar.xz: $(GO_FILES) $(GOX)
132 133 134 135 136
	# Create directory
	mkdir -p out/docker

ifneq (, $(shell docker info))
	# Building gitlab-runner-helper
137
	gox -osarch=linux/arm \
138 139
		-ldflags "$(GO_LDFLAGS)" \
		-output="dockerfiles/build/gitlab-runner-helper" \
140
		$(PKG)/apps/gitlab-runner-helper
141 142

	# Build docker images
143
	docker build -t gitlab/gitlab-runner-helper:arm-$(REVISION) -f dockerfiles/build/Dockerfile.arm dockerfiles/build
144
	-docker rm -f gitlab-runner-prebuilt-arm-$(REVISION)
145
	docker create --name=gitlab-runner-prebuilt-arm-$(REVISION) gitlab/gitlab-runner-helper:arm-$(REVISION) /bin/sh
146 147
	docker export -o out/docker/prebuilt-arm.tar gitlab-runner-prebuilt-arm-$(REVISION)
	docker rm -f gitlab-runner-prebuilt-arm-$(REVISION)
148
	xz -f -9 out/docker/prebuilt-arm.tar
149 150 151 152
else
	$(warning =============================================)
	$(warning WARNING: downloading prebuilt docker images that will be embedded in gitlab-runner)
	$(warning WARNING: to use images compiled from your code install Docker Engine)
153
	$(warning WARNING: and remove out/docker/prebuilt-arm.tar.xz)
154
	$(warning =============================================)
155
	curl -o out/docker/prebuilt-arm.tar.xz \
156
		https://gitlab-runner-downloads.s3.amazonaws.com/master/docker/prebuilt-arm.tar.xz
157 158
endif

159
executors/docker/bindata.go: out/docker/prebuilt-x86_64.tar.xz out/docker/prebuilt-arm.tar.xz $(GOBINDATA)
160 161 162 163 164 165 166 167
	# Generating embedded data
	go-bindata \
		-pkg docker \
		-nocompress \
		-nomemcopy \
		-nometadata \
		-prefix out/docker/ \
		-o executors/docker/bindata.go \
168 169
		out/docker/prebuilt-x86_64.tar.xz \
		out/docker/prebuilt-arm.tar.xz
170
	go fmt executors/docker/bindata.go
171

172
docker: executors/docker/bindata.go
173

174
build: executors/docker/bindata.go $(GOX)
175
	# Building $(NAME) in version $(VERSION) for $(BUILD_PLATFORMS)
176
	gox $(BUILD_PLATFORMS) \
177
		-ldflags "$(GO_LDFLAGS)" \
178 179
		-output="out/binaries/$(NAME)-{{.OS}}-{{.Arch}}" \
		$(PKG)
Kamil Trzciński's avatar
Kamil Trzciński committed
180

181
build_simple: $(GOPATH_SETUP)
182 183 184
	# Building $(NAME) in version $(VERSION) for current platform
	go build \
		-ldflags "$(GO_LDFLAGS)" \
185 186
		-o "out/binaries/$(NAME)" \
		$(PKG)
187

188 189
build_current: executors/docker/bindata.go build_simple

190 191 192
check_race_conditions: executors/docker/bindata.go
	@./scripts/check_race_conditions $(OUR_PACKAGES)

193
test: executors/docker/bindata.go
Kamil Trzciński's avatar
Kamil Trzciński committed
194
	# Running tests...
195
	go test $(OUR_PACKAGES) $(TESTFLAGS)
Kamil Trzciński's avatar
Kamil Trzciński committed
196

197
install: executors/docker/bindata.go
198
	go install --ldflags="$(GO_LDFLAGS)" $(PKG)
199

200 201 202
dockerfiles:
	make -C dockerfiles all

203 204
# We rely on user GOPATH 'cause mockery seems not to be able to find dependencies in vendor directory
mocks: $(MOCKERY)
205
	rm -rf ./helpers/service/mocks
206
	find . -type f ! -path '*vendor/*' -name 'mock_*' -delete
207 208 209
	GOPATH=$(ORIGINAL_GOPATH) mockery $(MOCKERY_FLAGS) -dir=./vendor/github.com/ayufan/golang-kardianos-service -output=./helpers/service/mocks -name='(Interface|Logger)'
	GOPATH=$(ORIGINAL_GOPATH) mockery $(MOCKERY_FLAGS) -dir=./helpers/docker -all -inpkg
	GOPATH=$(ORIGINAL_GOPATH) mockery $(MOCKERY_FLAGS) -dir=./common -all -inpkg
210
	GOPATH=$(ORIGINAL_GOPATH) mockery $(MOCKERY_FLAGS) -dir=./shells -name fakeIAMCredentialsProvider -inpkg
211

212
test-docker:
213 214 215 216 217 218 219
	make test-docker-image IMAGE=centos:6 TYPE=rpm
	make test-docker-image IMAGE=centos:7 TYPE=rpm
	make test-docker-image IMAGE=debian:wheezy TYPE=deb
	make test-docker-image IMAGE=debian:jessie TYPE=deb
	make test-docker-image IMAGE=ubuntu-upstart:precise TYPE=deb
	make test-docker-image IMAGE=ubuntu-upstart:trusty TYPE=deb
	make test-docker-image IMAGE=ubuntu-upstart:utopic TYPE=deb
220 221

test-docker-image:
222 223
	tests/test_installation.sh $(IMAGE) out/$(TYPE)/$(PACKAGE_NAME)_amd64.$(TYPE)
	tests/test_installation.sh $(IMAGE) out/$(TYPE)/$(PACKAGE_NAME)_amd64.$(TYPE) Y
224

225 226 227 228 229 230
build-and-deploy:
	make build BUILD_PLATFORMS="-os=linux -arch=amd64"
	make package-deb-fpm ARCH=amd64 PACKAGE_ARCH=amd64
	scp out/deb/$(PACKAGE_NAME)_amd64.deb $(SERVER):
	ssh $(SERVER) dpkg -i $(PACKAGE_NAME)_amd64.deb

231 232 233 234
build-and-deploy-binary:
	make build BUILD_PLATFORMS="-os=linux -arch=amd64"
	scp out/binaries/$(PACKAGE_NAME)-linux-amd64 $(SERVER):/usr/bin/gitlab-runner

235 236 237 238
package: package-deps package-prepare package-deb package-rpm

package-deps:
	# Installing packaging dependencies...
239
	gem install rake fpm --no-ri --no-rdoc
240 241

package-prepare:
242
	chmod 755 packaging/root/usr/share/gitlab-runner/
243
	chmod 755 packaging/root/usr/share/gitlab-runner/*
244

245
package-deb: package-deps package-prepare
Kamil Trzciński's avatar
Kamil Trzciński committed
246
	# Building Debian compatible packages...
Kamil Trzciński's avatar
Kamil Trzciński committed
247
	make package-deb-fpm ARCH=amd64 PACKAGE_ARCH=amd64
248
	make package-deb-fpm ARCH=386 PACKAGE_ARCH=i386
249
	make package-deb-fpm ARCH=arm PACKAGE_ARCH=armel
Kamil Trzciński's avatar
Kamil Trzciński committed
250
	make package-deb-fpm ARCH=arm PACKAGE_ARCH=armhf
251

252
package-rpm: package-deps package-prepare
Kamil Trzciński's avatar
Kamil Trzciński committed
253
	# Building RedHat compatible packages...
Kamil Trzciński's avatar
Kamil Trzciński committed
254
	make package-rpm-fpm ARCH=amd64 PACKAGE_ARCH=amd64
Kamil Trzciński's avatar
Kamil Trzciński committed
255
	make package-rpm-fpm ARCH=386 PACKAGE_ARCH=i686
Kamil Trzciński's avatar
Kamil Trzciński committed
256 257
	make package-rpm-fpm ARCH=arm PACKAGE_ARCH=arm
	make package-rpm-fpm ARCH=arm PACKAGE_ARCH=armhf
Kamil Trzciński's avatar
Kamil Trzciński committed
258 259

package-deb-fpm:
260
	@mkdir -p out/deb/
Kamil Trzciński's avatar
Kamil Trzciński committed
261
	fpm -s dir -t deb -n $(PACKAGE_NAME) -v $(VERSION) \
Kamil Trzciński's avatar
Kamil Trzciński committed
262
		-p out/deb/$(PACKAGE_NAME)_$(PACKAGE_ARCH).deb \
263 264 265
		--deb-priority optional --category admin \
		--force \
		--deb-compression bzip2 \
266 267
		--after-install packaging/scripts/postinst.deb \
		--before-remove packaging/scripts/prerm.deb \
268
		--url https://gitlab.com/gitlab-org/gitlab-runner \
269
		--description "GitLab Runner" \
270
		-m "GitLab Inc. <support@gitlab.com>" \
271
		--license "MIT" \
272
		--vendor "GitLab Inc." \
273 274 275 276 277
		--conflicts $(PACKAGE_NAME)-beta \
		--conflicts gitlab-ci-multi-runner \
		--conflicts gitlab-ci-multi-runner-beta \
		--provides gitlab-ci-multi-runner \
		--replaces gitlab-ci-multi-runner \
278 279
		--depends ca-certificates \
		--depends git \
280 281
		--depends curl \
		--depends tar \
282
		--deb-suggests docker-engine \
Kamil Trzciński's avatar
Kamil Trzciński committed
283
		-a $(PACKAGE_ARCH) \
Kamil Trzciński's avatar
Kamil Trzciński committed
284
		packaging/root/=/ \
285
		out/binaries/$(NAME)-linux-$(ARCH)=/usr/bin/gitlab-runner
286

Kamil Trzciński's avatar
Kamil Trzciński committed
287
package-rpm-fpm:
288
	@mkdir -p out/rpm/
Kamil Trzciński's avatar
Kamil Trzciński committed
289
	fpm -s dir -t rpm -n $(PACKAGE_NAME) -v $(VERSION) \
Kamil Trzciński's avatar
Kamil Trzciński committed
290
		-p out/rpm/$(PACKAGE_NAME)_$(PACKAGE_ARCH).rpm \
291 292
		--rpm-compression bzip2 --rpm-os linux \
		--force \
293 294
		--after-install packaging/scripts/postinst.rpm \
		--before-remove packaging/scripts/prerm.rpm \
295
		--url https://gitlab.com/gitlab-org/gitlab-runner \
296
		--description "GitLab Runner" \
297
		-m "GitLab Inc. <support@gitlab.com>" \
298
		--license "MIT" \
299
		--vendor "GitLab Inc." \
300 301 302 303 304
		--conflicts $(PACKAGE_NAME)-beta \
		--conflicts gitlab-ci-multi-runner \
		--conflicts gitlab-ci-multi-runner-beta \
		--provides gitlab-ci-multi-runner \
		--replaces gitlab-ci-multi-runner \
305 306 307
		--depends git \
		--depends curl \
		--depends tar \
Kamil Trzciński's avatar
Kamil Trzciński committed
308
		-a $(PACKAGE_ARCH) \
Kamil Trzciński's avatar
Kamil Trzciński committed
309
		packaging/root/=/ \
310
		out/binaries/$(NAME)-linux-$(ARCH)=/usr/bin/gitlab-runner
311

Kamil Trzciński's avatar
Kamil Trzciński committed
312 313 314 315
packagecloud: packagecloud-deps packagecloud-deb packagecloud-rpm

packagecloud-deps:
	# Installing packagecloud dependencies...
316
	gem install package_cloud --version "~> 0.3.0" --no-ri --no-rdoc
Kamil Trzciński's avatar
Kamil Trzciński committed
317

318
packagecloud-deb:
Kamil Trzciński's avatar
Kamil Trzciński committed
319
	# Sending Debian compatible packages...
320 321 322
	-for DIST in $(DEB_PLATFORMS); do \
		package_cloud push --url $(PACKAGE_CLOUD_URL) $(PACKAGE_CLOUD)/$$DIST out/deb/*.deb; \
	done
323 324

packagecloud-rpm:
Kamil Trzciński's avatar
Kamil Trzciński committed
325
	# Sending RedHat compatible packages...
326 327 328
	-for DIST in $(RPM_PLATFORMS); do \
		package_cloud push --url $(PACKAGE_CLOUD_URL) $(PACKAGE_CLOUD)/$$DIST out/rpm/*.rpm; \
	done
329 330 331

packagecloud-yank:
ifneq ($(YANK),)
Kamil Trzciński's avatar
Kamil Trzciński committed
332
	# Removing $(YANK) from packagecloud...
333 334
	-for DIST in $(DEB_PLATFORMS); do \
		for ARCH in $(DEB_ARCHS); do \
Kamil Trzciński's avatar
Kamil Trzciński committed
335 336 337
			package_cloud yank --url $(PACKAGE_CLOUD_URL) $(PACKAGE_CLOUD)/$$DIST $(PACKAGE_NAME)_$(YANK)_$$ARCH.deb & \
		done; \
	done; \
338 339
	for DIST in $(RPM_PLATFORMS); do \
		for ARCH in $(RPM_ARCHS); do \
Kamil Trzciński's avatar
Kamil Trzciński committed
340 341
			package_cloud yank --url $(PACKAGE_CLOUD_URL) $(PACKAGE_CLOUD)/$$DIST $(PACKAGE_NAME)-$(YANK)-1.$$ARCH.rpm & \
		done; \
Kamil Trzciński's avatar
Kamil Trzciński committed
342 343
	done; \
	wait
Kamil Trzciński's avatar
Kamil Trzciński committed
344 345 346
else
	# No version specified in YANK
	@exit 1
347
endif
348

Kamil Trzciński's avatar
Kamil Trzciński committed
349 350 351 352 353
s3-upload:
	export ARTIFACTS_DEST=artifacts; curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/master/install | bash
	./artifacts upload \
		--permissions public-read \
		--working-dir out \
Kamil Trzciński's avatar
Kamil Trzciński committed
354
		--target-paths "$(S3_UPLOAD_PATH)/" \
355
		--max-size $(shell du -bs out/ | cut -f1) \
Kamil Trzciński's avatar
Kamil Trzciński committed
356
		$(shell cd out/; find . -type f)
357
	@echo "\n\033[1m==> Download index file: \033[36mhttps://$$ARTIFACTS_S3_BUCKET.s3.amazonaws.com/$$S3_UPLOAD_PATH/index.html\033[0m\n"
Kamil Trzciński's avatar
Kamil Trzciński committed
358

359 360
release_packagecloud:
	# Releasing to https://packages.gitlab.com/runner/
361
	@./ci/release_packagecloud "$$CI_JOB_NAME"
362

363
release_s3: prepare_windows_zip prepare_zoneinfo prepare_index
364 365
	# Releasing to S3
	@./ci/release_s3
366

367 368 369 370 371 372 373
prepare_windows_zip:
	# Prepare ZIP archives for Windows *.exe files
	@cd out/binaries/; \
	for file in $$(find * -type f -name "*windows*.exe" | sed 's/.exe$$//'); do \
		zip $${file}.zip $${file}.exe; \
	done

374 375 376 377
prepare_zoneinfo:
	# preparing the zoneinfo file
	@cp $$GOROOT/lib/time/zoneinfo.zip out/

378
prepare_index:
379
	# Preparing index file
380 381
	@./ci/prepare_index

382
release_docker_images:
383
	# Releasing Docker images
384
	@./ci/release_docker_images
385

386 387 388
check-tags-in-changelog:
	# Looking for tags in CHANGELOG
	@git status | grep "On branch master" 2>&1 >/dev/null || echo "Check should be done on master branch only. Skipping."
389
	@for tag in $$(git tag | grep -E "^v[0-9]+\.[0-9]+\.[0-9]+$$" | sed 's|v||' | sort -g); do \
390 391 392 393 394 395
		state="MISSING"; \
		grep "^v $$tag" CHANGELOG.md 2>&1 >/dev/null; \
		[ "$$?" -eq 1 ] || state="OK"; \
		echo "$$tag:   \t $$state"; \
	done

396 397 398 399 400
development_setup:
	test -d tmp/gitlab-test || git clone https://gitlab.com/gitlab-org/gitlab-test.git tmp/gitlab-test
	if prlctl --version ; then $(MAKE) -C tests/ubuntu parallels ; fi
	if vboxmanage --version ; then $(MAKE) -C tests/ubuntu virtualbox ; fi

401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423
# local GOPATH
$(GOPATH_SETUP): $(PKG_BUILD_DIR)
	mkdir -p $(GOPATH_BIN)
	touch $@

$(PKG_BUILD_DIR):
	mkdir -p $(@D)
	ln -s ../../../.. $@

# development tools
$(GOX): $(GOPATH_SETUP)
	go get github.com/mitchellh/gox

$(GOBINDATA): $(GOPATH_SETUP)
	go get github.com/jteeuwen/go-bindata/...

$(MOCKERY): $(GOPATH_SETUP)
	go get github.com/vektra/mockery/.../

clean:
	-$(RM) -rf $(LOCAL_GOPATH)
	-$(RM) executors/docker/bindata.go
	-$(RM) -rf $(TARGET_DIR)