Skip to content

Commit 36c2c1f

Browse files
authored
Merge pull request #375 from devlights/devlights/add-sqlite-sample-database-374
Update Makefile - download sqlite3 sample database
2 parents 3ffbe91 + 68934d0 commit 36c2c1f

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,5 @@ fabric.properties
7070
tags
7171

7272
trygolang
73-
.target
73+
.target
74+
chinook.db

Makefile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,20 @@ endif
3131
all: clean build test
3232

3333
.PHONY: prepare
34-
prepare:
35-
# GO111MODULE=off go get golang.org/dl/go1.16
36-
# go1.16 download
34+
prepare: \
35+
_go_get \
36+
_download_sqlite3_database
37+
38+
_go_get:
3739
$(GOCMD) get -d ./...
3840

41+
_download_sqlite3_database:
42+
@if [ ! -e "chinook.db" ]; then\
43+
wget https://www.sqlitetutorial.net/wp-content/uploads/2018/03/chinook.zip;\
44+
unzip -o chinook.zip;\
45+
rm -f chinook.zip;\
46+
fi
47+
3948
.PHONY: build
4049
build: prepare
4150
$(GOBUILD) -race -o $(BIN_NAME) $(CMD_PKG)

0 commit comments

Comments
 (0)