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

Commit

Permalink
Merge remote-tracking branch 'origin/master' into path
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Oct 4, 2018
2 parents 8b75206 + c889ed1 commit d6bce5b
Show file tree
Hide file tree
Showing 39 changed files with 333 additions and 183 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -31,3 +31,4 @@ coverage.out
vendor
dist
coverage.txt
antibody
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "www/themes/hugo-apex-theme"]
path = www/themes/hugo-apex-theme
url = https://github.com/caarlos0/hugo-apex-theme
26 changes: 15 additions & 11 deletions .travis.yml
@@ -1,22 +1,26 @@
language: go
go: 1.9
go: '1.10'
install:
- make setup
- npm install -g prettier
script: make ci
after_success:
- bash <(curl -s https://codecov.io/bash)
- gem install fpm
- test -n "$TRAVIS_TAG" && curl -sL https://git.io/goreleaser | bash
- make static
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
repo: getantibody/getantibody.github.io
local_dir: ./dist/getantibody.github.io
target_branch: master
on:
master: true
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: www/public
target_branch: master
repo: getantibody/getantibody.github.io
verbose: true
on:
branch: master
- provider: script
skip_cleanup: true
script: curl -sL https://git.io/goreleaser | bash -s -- --rm-dist
on:
tags: true
notifications:
email: false
20 changes: 10 additions & 10 deletions CODE_OF_CONDUCT.md
Expand Up @@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Expand Up @@ -9,9 +9,9 @@ conduct](/CODE_OF_CONDUCT.md).

Prerequisites are:

* Build:
* `make`
* [Go 1.8+](http://golang.org/doc/install)
- Build:
- `make`
- [Go 1.8+](http://golang.org/doc/install)

Clone `antibody` from source into `$GOPATH`:

Expand Down
37 changes: 23 additions & 14 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions Gopkg.toml
Expand Up @@ -14,10 +14,6 @@
branch = "master"
name = "golang.org/x/crypto"

[[constraint]]
branch = "master"
name = "golang.org/x/net"

[[constraint]]
branch = "master"
name = "golang.org/x/sync"
Expand Down
55 changes: 25 additions & 30 deletions Makefile
@@ -1,21 +1,25 @@
SOURCE_FILES?=./...
TEST_PATTERN?=.
TEST_OPTIONS?=
OS=$(shell uname -s)

export PATH := ./bin:$(PATH)

# Install all the build and lint dependencies
setup:
go get -u github.com/alecthomas/gometalinter
go get -u github.com/golang/dep/cmd/dep
go get -u github.com/pierrre/gotestcover
go get -u golang.org/x/tools/cmd/cover
go get -u github.com/apex/static/cmd/static-docs
dep ensure
gometalinter --install
curl -sfL https://install.goreleaser.com/github.com/gohugoio/hugo.sh | sh
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh
ifeq ($(OS), Darwin)
brew install dep
else
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
endif
dep ensure -vendor-only
.PHONY: setup

# Run all the tests
test:
gotestcover $(TEST_OPTIONS) -covermode=atomic -coverprofile=coverage.txt $(SOURCE_FILES) -run $(TEST_PATTERN) -timeout=60s
go test $(TEST_OPTIONS) -failfast -race -coverpkg=./... -covermode=atomic -coverprofile=coverage.txt $(SOURCE_FILES) -run $(TEST_PATTERN) -timeout=2m
.PHONY: test

# Run all the tests and opens the coverage report
Expand All @@ -25,12 +29,12 @@ cover: test

# Run all the linters
lint:
gometalinter --vendor ./...
./bin/golangci-lint run --enable-all ./...
find . -name '*.md' -not -wholename './vendor/*' | xargs prettier -l
.PHONY: lint

# Run all the tests and code checks
ci: lint test
ci: build test lint
.PHONY: ci

# Build a beta version
Expand All @@ -44,28 +48,19 @@ fmt:
find . -name '*.md' -not -wholename './vendor/*' | xargs prettier --write
.PHONY: fmt

# Generates the static documentation
static-gen:
@rm -rf dist/getantibody.github.io/theme
@static-docs \
--in docs \
--out dist/getantibody.github.io \
--title Antibody \
--subtitle "The fastest shell plugin manager" \
--google UA-68164063-1
.PHONY: static-gen

# Downloads and generates the static documentation
# Generate the static documentation
static:
@rm -rf dist/getantibody.github.io
@mkdir -p dist
@git clone https://github.com/getantibody/getantibody.github.io.git dist/getantibody.github.io
@make static-gen
@hugo --enableGitInfo --source www
.PHONY: static

# Opens the current docs on the default browser
static-open:
open dist/getantibody.github.io/index.html
.PHONY: static-open
serve:
@hugo server --enableGitInfo --watch --source www
.PHONY: serve

favicon:
wget -O www/static/avatar.png https://avatars2.githubusercontent.com/u/16625397
convert www/static/avatar.png -define icon:auto-resize=64,48,32,16 www/static/favicon.ico
convert www/static/avatar.png -resize x120 www/static/apple-touch-icon.png
.PHONY: favicon

.DEFAULT_GOAL := build
28 changes: 14 additions & 14 deletions README.md
Expand Up @@ -5,7 +5,7 @@
<p align="center">
<a href="https://github.com/getantibody/antibody/releases/latest"><img alt="Release" src="https://img.shields.io/github/release/getantibody/antibody.svg?style=flat-square"></a>
<a href="/LICENSE.md"><img alt="Software License" src="https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square"></a>
<a href="https://travis-ci.org/getantibody/antibody"><img alt="Travis" src="https://img.shields.io/travis/getantibody/antibody.svg?style=flat-square"></a>
<a href="https://travis-ci.org/getantibody/antibody"><img alt="Travis" src="https://img.shields.io/travis/getantibody/antibody/master.svg?style=flat-square"></a>
<a href="https://codecov.io/gh/getantibody/antibody"><img alt="Codecov branch" src="https://img.shields.io/codecov/c/github/getantibody/antibody/master.svg?style=flat-square"></a>
<a href="https://goreportcard.com/report/github.com/getantibody/antibody"><img alt="Go Report Card" src="https://goreportcard.com/badge/github.com/getantibody/antibody?style=flat-square"></a>
<a href="http://godoc.org/github.com/getantibody/antibody"><img alt="Go Doc" src="https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square"></a>
Expand All @@ -21,23 +21,23 @@ performance.

## Documentation

Documentation can be found in the [docs folder](docs) and live
Documentation can be found in the [docs folder](www/content) and live
at https://getantibody.github.io

## In the wild

* I did this mostly for myself, so, my [dotfiles](https://github.com/caarlos0/dotfiles);
* @mkwmms' [dotfiles](https://github.com/mkwmms/dotfiles);
* @oieduardorabelo's [dotfiles](https://github.com/oieduardorabelo/dotfiles);
* @nisaacson's [dotfiles](https://github.com/nisaacson/dotfiles);
* @pragmaticivan's [dotfiles](https://github.com/pragmaticivan/dotfiles);
* @wkentaro's [dotfiles](https://github.com/wkentaro/dotfiles);
* @marceldias' [dotfiles](https://github.com/marceldiass/dotfiles);
* @davidkna's [dotfiles](https://github.com/davidkna/dotfiles);
* @sobolevn's [dotfiles](https://github.com/sobolevn/dotfiles);
* and probably [many others](https://github.com/search?q=antibody&type=Code);
- I did this mostly for myself, so, my [dotfiles](https://github.com/caarlos0/dotfiles);
- @mkwmms' [dotfiles](https://github.com/mkwmms/dotfiles);
- @oieduardorabelo's [dotfiles](https://github.com/oieduardorabelo/dotfiles);
- @nisaacson's [dotfiles](https://github.com/nisaacson/dotfiles);
- @pragmaticivan's [dotfiles](https://github.com/pragmaticivan/dotfiles);
- @wkentaro's [dotfiles](https://github.com/wkentaro/dotfiles);
- @marceldias' [dotfiles](https://github.com/marceldiass/dotfiles);
- @davidkna's [dotfiles](https://github.com/davidkna/dotfiles);
- @sobolevn's [dotfiles](https://github.com/sobolevn/dotfiles);
- and probably [many others](https://github.com/search?q=antibody&type=Code);

## Thanks

* [@pragmaticivan](https://github.com/pragmaticivan), for the logo design;
* All the amazing [contributors](https://github.com/getantibody/antibody/graphs/contributors).
- [@pragmaticivan](https://github.com/pragmaticivan), for the logo design;
- All the amazing [contributors](https://github.com/getantibody/antibody/graphs/contributors).
2 changes: 1 addition & 1 deletion antibodylib/antibody.go
Expand Up @@ -51,7 +51,7 @@ func (a *Antibody) Bundle() (result string, err error) {
}
s, berr := bundle.New(a.Home, l).Get()
lock.Lock()
shs = append(shs, indexedLine{index, s})
shs = append(shs, indexedLine{idx: index, line: s})
lock.Unlock()
return berr
})
Expand Down

0 comments on commit d6bce5b

Please sign in to comment.