mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
16
.travis.yml
Normal file
16
.travis.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
dist: trusty
|
||||
sudo: required
|
||||
|
||||
language: go
|
||||
go:
|
||||
- 1.8
|
||||
- 1.9
|
||||
go_import_path: github.com/redhat-developer/ocdev
|
||||
|
||||
|
||||
install:
|
||||
- make goget-tools
|
||||
|
||||
script:
|
||||
- make
|
||||
- make validate
|
||||
12
Makefile
12
Makefile
@@ -1,4 +1,7 @@
|
||||
BUILD_FLAGS := -ldflags="-w -X github.com/redhat-developer/ocdev/cmd.GITCOMMIT=$(GITCOMMIT)"
|
||||
PROJECT := github.com/redhat-developer/ocdev
|
||||
GITCOMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)
|
||||
PKGS := $(shell go list ./... | grep -v $(PROJECT)/vendor)
|
||||
BUILD_FLAGS := -ldflags="-w -X $(PROJECT)/cmd.GITCOMMIT=$(GITCOMMIT)"
|
||||
|
||||
default: bin
|
||||
|
||||
@@ -26,3 +29,10 @@ lint:
|
||||
.PHONY: vet
|
||||
vet:
|
||||
go vet $(PKGS)
|
||||
|
||||
# install tools used for building, tests and validations
|
||||
.PHONY: goget-tools
|
||||
goget-tools:
|
||||
go get -u github.com/golang/dep/cmd/dep
|
||||
go get -u github.com/golang/lint/golint
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# ocdev
|
||||
[](https://travis-ci.org/redhat-developer/ocdev)
|
||||
|
||||
## What is ocdev?
|
||||
OpenShift Command line for Developers
|
||||
|
||||
### How to use ocdev as an oc plugin?
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
GO_FILES=$(find . -path ./vendor -prune -o -name '*.go' -print )
|
||||
#!/bin/bash
|
||||
|
||||
# Why we are wrapping gofmt?
|
||||
# - ignore files in vendor direcotry
|
||||
# - gofmt doesn't exit with error code when there are errors
|
||||
|
||||
GO_FILES=$(find . -path ./vendor -prune -o -name '*.go' -print)
|
||||
|
||||
for file in $GO_FILES; do
|
||||
gofmtOutput=$(gofmt -l "$file")
|
||||
|
||||
Reference in New Issue
Block a user