Skip to content
This repository was archived by the owner on May 27, 2019. It is now read-only.

Commit a948381

Browse files
chore(*): update docker-go-dev and switch to using new linter (#220)
1 parent 7003286 commit a948381

3 files changed

Lines changed: 6 additions & 18 deletions

File tree

Makefile

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ REPO_PATH := github.com/deis/${SHORT_NAME}
1212

1313
# The following variables describe the containerized development environment
1414
# and other build options
15-
DEV_ENV_IMAGE := quay.io/deis/go-dev:0.13.0
15+
DEV_ENV_IMAGE := quay.io/deis/go-dev:0.16.0
1616
DEV_ENV_WORK_DIR := /go/src/${REPO_PATH}
1717
DEV_ENV_CMD := docker run --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR} ${DEV_ENV_IMAGE}
1818
DEV_ENV_CMD_INT := docker run -it --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR} ${DEV_ENV_IMAGE}
@@ -36,12 +36,6 @@ SVC := manifests/deis-${SHORT_NAME}-service.yaml
3636
dev: check-docker
3737
${DEV_ENV_CMD_INT} bash
3838

39-
dev-registry: check-docker
40-
@docker inspect registry >/dev/null 2>&1 && docker start registry || docker run --restart="always" -d -p 5000:5000 --name registry registry:0.9.1
41-
@echo
42-
@echo "To use a local registry for Deis development:"
43-
@echo " export DEIS_REGISTRY=`docker-machine ip $$(docker-machine active 2>/dev/null) 2>/dev/null || echo $(HOST_IPADDR) `:5000/"
44-
4539
# Containerized dependency resolution
4640
bootstrap: check-docker
4741
${DEV_ENV_CMD} glide install
@@ -98,11 +92,7 @@ test-style: check-docker
9892

9993
# This should only be executed within the containerized development environment.
10094
style-check:
101-
# display output, then check
102-
gofmt -l ${GO_FILES} ${GO_DIRS}
103-
@gofmt -l ${GO_FILES} ${GO_DIRS} | read; if [ $$? == 0 ]; then echo "gofmt check failed."; exit 1; fi
104-
go vet ${GO_PACKAGES}
105-
for package in $$(glide novendor | tr " " "\n"); do golint $$package; done
95+
lint
10696
shellcheck $(SHELL_SCRIPTS)
10797

10898
test-unit:

nginx/config.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ http {
225225
`
226226
)
227227

228+
// WriteCerts writes SSL certs to file from router configuration.
228229
func WriteCerts(routerConfig *model.RouterConfig, sslPath string) error {
229230
// Start by deleting all certs and their corresponding keys. This will ensure certs we no longer
230231
// need are deleted. Certs that are still needed will simply be re-written.
@@ -272,13 +273,10 @@ func writeCert(context string, certificate *model.Certificate, sslPath string) e
272273
if err != nil {
273274
return err
274275
}
275-
err = ioutil.WriteFile(keyPath, []byte(certificate.Key), 0600)
276-
if err != nil {
277-
return err
278-
}
279-
return nil
276+
return ioutil.WriteFile(keyPath, []byte(certificate.Key), 0600)
280277
}
281278

279+
// WriteDHParam writes router DHParam to file from router configuration.
282280
func WriteDHParam(routerConfig *model.RouterConfig, sslPath string) error {
283281
dhParamPath := filepath.Join(sslPath, "dhparam.pem")
284282
if routerConfig.SSLConfig.DHParam == "" {

rootfs/bin/get_src_gpg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ gpg --list-keys --fingerprint --with-colons |
1111
gpg --import-ownertrust
1212
curl -sSL "$url" -o "$f"
1313
curl -sSL "$url.asc" -o "$f.asc"
14-
gpg --verify $f.asc
14+
gpg --verify "$f.asc"
1515
tar xzf "$f"
1616
rm "$f"

0 commit comments

Comments
 (0)