Skip to content

Commit

Permalink
Merge pull request #5 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 0.1.0
  • Loading branch information
andyone authored Mar 9, 2017
2 parents 23a8da5 + 4a9f792 commit 910368a
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ language: go
go:
- 1.6.x
- 1.7.x
- 1.8.x
- tip

os:
Expand All @@ -21,9 +22,8 @@ matrix:
- go: tip

before_install:
- go get -v pkg.re/essentialkaos/ek.v6
- go get -v pkg.re/essentialkaos/go-simpleyaml.v1
- make deps

script:
- go build yo.go
- make all
- .travis/script.sh
9 changes: 9 additions & 0 deletions .travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ has_errors=""
################################################################################

main() {
if [[ ! -e $BINARY ]] ; then
echo -e "${CL_RED}Can't find yo binary${CL_NORM}"
exit 1
fi

runTest
}

runTest() {
header "Basic selectors"

check ".name" "John Doe"
Expand Down
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
########################################################################################

.PHONY = fmt all clean deps

########################################################################################

all: yo

yo:
go build yo.go

deps:
go get -v pkg.re/essentialkaos/ek.v7
go get -v pkg.re/essentialkaos/go-simpleyaml.v1

fmt:
find . -name "*.go" -exec gofmt -s -w {} \;

clean:
rm -f yo

########################################################################################

5 changes: 4 additions & 1 deletion common/yo.spec
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

Summary: Command-line YAML processor
Name: yo
Version: 0.0.2
Version: 0.1.0
Release: 0%{?dist}
Group: Applications/System
License: EKOL
Expand Down Expand Up @@ -92,6 +92,9 @@ rm -rf %{buildroot}
###############################################################################

%changelog
* Wed Mar 08 2017 Anton Novojilov <[email protected]> - 0.1.0-0
- ek package updated to v7

* Tue Feb 14 2017 Anton Novojilov <[email protected]> - 0.0.2-0
- Fixed output for arrays with maps and sub arrays

Expand Down
14 changes: 6 additions & 8 deletions yo.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import (
"strconv"
"strings"

"pkg.re/essentialkaos/ek.v6/arg"
"pkg.re/essentialkaos/ek.v6/env"
"pkg.re/essentialkaos/ek.v6/fmtc"
"pkg.re/essentialkaos/ek.v6/fsutil"
"pkg.re/essentialkaos/ek.v6/usage"
"pkg.re/essentialkaos/ek.v7/arg"
"pkg.re/essentialkaos/ek.v7/env"
"pkg.re/essentialkaos/ek.v7/fmtc"
"pkg.re/essentialkaos/ek.v7/fsutil"
"pkg.re/essentialkaos/ek.v7/usage"

"pkg.re/essentialkaos/go-simpleyaml.v1"
)
Expand All @@ -28,7 +28,7 @@ import (

const (
APP = "Yo"
VER = "0.0.2"
VER = "0.1.0"
DESC = "Command-line YAML processor"
)

Expand Down Expand Up @@ -537,8 +537,6 @@ func (t Token) IsArrayToken() bool {
// ////////////////////////////////////////////////////////////////////////////////// //

func showUsage() {
usage.Breadcrumbs = true

info := usage.NewInfo("", "query")

info.AddOption(ARG_FROM_FILE, "Read data from file", "filename")
Expand Down

0 comments on commit 910368a

Please sign in to comment.