Skip to content

Commit

Permalink
Update Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafe Colton committed Nov 2, 2014
1 parent 715595e commit 77163c7
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 24 deletions.
8 changes: 4 additions & 4 deletions Documentation/upgrading-zero-to-one.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ project = "my-app"
excluded = ["spec"]
tags = [
"git:branch",
"git:rev",
"git:short"
"git:sha",
"git:tag"
]

[containers.base]
Expand Down Expand Up @@ -67,8 +67,8 @@ project = "my-app"
excluded = ["spec"]
tags = [
"git:branch",
"git:rev",
"git:short"
"git:sha",
"git:tag"
]

[[container]] # <--- this line changed, used to be [containers.base]
Expand Down
12 changes: 6 additions & 6 deletions Documentation/writing-a-bobfile-version-zero.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ project = "my-app"
excluded = ["spec"]
tags = [
"git:branch",
"git:rev",
"git:short"
"git:sha",
"git:tag"
]

[containers.base]
Expand Down Expand Up @@ -99,8 +99,8 @@ excluded = ["spec"]
included = []
tags = [
"git:branch",
"git:rev",
"git:short"
"git:sha",
"git:tag"
]
```

Expand Down Expand Up @@ -134,8 +134,8 @@ The following macro tags are currently available:

* `git`
- `git:branch` - the git branch of the app repo (`git rev-parse -q --abbrev-ref HEAD`)
- `git:rev` - the full git revision of the app repo (`git rev-parse -q HEAD`)
- `git:short` - the shortened version of the app repo rev (`git describe --always`)
- `git:sha` - the full git sha of the app repo (`git rev-parse -q HEAD`)
- `git:tag` - the shortened version of the app repo rev (`git describe --always`)

## Linting &amp; Building

Expand Down
12 changes: 6 additions & 6 deletions Documentation/writing-a-bobfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ dockercfg_email = "baz@example.com"
project = "my-app"
tags = [
"git:branch",
"git:rev",
"git:short"
"git:sha",
"git:tag"
]

[[container]]
Expand Down Expand Up @@ -99,8 +99,8 @@ dockercfg_email = "baz@example.com"
project = "my-app"
tags = [
"git:branch",
"git:rev",
"git:short"
"git:sha",
"git:tag"
]
```

Expand Down Expand Up @@ -139,8 +139,8 @@ The following macro tags are currently available:

* `git`
- `git:branch` - the git branch of the app repo (`git rev-parse -q --abbrev-ref HEAD`)
- `git:rev` - the full git revision of the app repo (`git rev-parse -q HEAD`)
- `git:short` - the shortened version of the app repo rev (`git describe --always --dirty --tags`)
- `git:sha` - the full git sha of the app repo (`git rev-parse -q HEAD`)
- `git:tag` - the shortened version of the app repo rev (`git describe --always --dirty --tags`)

## Linting &amp; Building

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ VERSION_VAR := $(B)/version.VersionString
BRANCH_VAR := $(B)/version.BranchString
REPO_VERSION := $(shell git describe --always --dirty --tags)
REPO_REV := $(shell git rev-parse --sq HEAD)
REPO_BRANCH := $(shell git rev-parse -q --abbrev-ref HEAD)
REPO_BRANCH := $(shell git rev-parse -q --abbrev-ref HEAD) # FIXME: will be "HEAD" if not on branch
GOBUILD_VERSION_ARGS := -ldflags "\
-X $(REV_VAR) $(REPO_REV) \
-X $(VERSION_VAR) $(REPO_VERSION) \
Expand Down
4 changes: 2 additions & 2 deletions analyzer/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ func ParseAnalysis(analysis Analysis) (*builderfile.Builderfile, error) {
Project: analysis.RepoBasename(),
Tags: []string{
"git:branch",
"git:rev",
"git:short",
"git:sha",
"git:tag",
"latest",
},
}
Expand Down
4 changes: 2 additions & 2 deletions analyzer/analyzer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ var _ = Describe("Analysis Parsing", func() {
Project: "fake-repo",
Tags: []string{
"git:branch",
"git:rev",
"git:short",
"git:sha",
"git:tag",
"latest",
},
Dockerfile: "Dockerfile",
Expand Down
6 changes: 3 additions & 3 deletions parser/tag/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ func (tag *nullTag) Tag() string {
}

/*
Tag, for a special set of macros (currently `git:branch`, `git:rev`,
& `git:short`) returns git information from the directory in which bob was run.
Tag, for a special set of macros (currently `git:branch`, `git:sha`,
& `git:tag`) returns git information from the directory in which bob was run.
These macros are specified in args["tag"], and to work properly, args["top"]
must be supplied as well. If any of the conditions are not met, Tag returns
"".
Expand Down Expand Up @@ -97,7 +97,7 @@ func (g gitexe) branch() string {
if string(branch[0]) == "*" {
continue
}
return strings.Replace(branch, " ", "", -1)
return strings.Trim(branch, " ")
}
return branch

Expand Down

0 comments on commit 77163c7

Please sign in to comment.