File tree 8 files changed +27
-6
lines changed
8 files changed +27
-6
lines changed Original file line number Diff line number Diff line change 1
1
**
2
+ ! bashbrew.sh
2
3
! cmd /
3
4
! go.mod
4
5
! go.sum
Original file line number Diff line number Diff line change 20
20
run : |
21
21
docker build --tag bashbrew --pull .
22
22
docker run --rm bashbrew tar -cC /usr/local/bin bashbrew | tar -xv
23
- ./bashbrew --help > /dev/null
23
+ ./bashbrew --version
24
24
- name : Smoke Test
25
25
run : |
26
26
image='https://github.com/docker-library/official-images/raw/master/library/hello-world'
Original file line number Diff line number Diff line change
1
+ bin /
Original file line number Diff line number Diff line change @@ -9,13 +9,14 @@ RUN apt-get update; \
9
9
rm -rf /var/lib/apt/lists/*
10
10
11
11
WORKDIR /usr/src/bashbrew
12
- COPY go.mod go.sum ./
12
+ COPY go.mod go.sum bashbrew.sh ./
13
13
COPY cmd cmd
14
14
COPY vendor vendor
15
15
RUN export CGO_ENABLED=0; \
16
- go build -mod vendor -v -o /usr/local/bin/bashbrew ./cmd/ bashbrew; \
16
+ bash -x ./ bashbrew.sh --version ; \
17
17
rm -r ~/.cache/go-build; \
18
- bashbrew --help > /dev/null
18
+ mv bin/bashbrew /usr/local/bin/; \
19
+ bashbrew --version
19
20
20
21
ENV BASHBREW_CACHE /bashbrew-cache
21
22
# make sure our default cache dir exists and is writable by anyone (similar to /tmp)
Original file line number Diff line number Diff line change 10
10
USAGE:
11
11
bashbrew [global options] command [command options] [arguments...]
12
12
13
+ VERSION:
14
+ v0.1.0
15
+
13
16
COMMANDS:
14
17
list, ls list repo:tag combinations for a given repo
15
18
build build (and tag) repo:tag combinations for a given repo
@@ -35,6 +38,7 @@ GLOBAL OPTIONS:
35
38
--library value where the bodies are buried (default: "/home/tianon/docker/official-images/library") [$BASHBREW_LIBRARY]
36
39
--cache value where the git wizardry is stashed (default: "/home/tianon/.cache/bashbrew") [$BASHBREW_CACHE]
37
40
--help, -h, -? show help
41
+ --version, -v print the version
38
42
```
39
43
40
44
## Installing
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -Eeuo pipefail
3
+
4
+ # a small shell script to help compile bashbrew
5
+
6
+ dir=" $( readlink -f " $BASH_SOURCE " ) "
7
+ dir=" $( dirname " $dir " ) "
8
+
9
+ export GO111MODULE=on
10
+ go build -o bin/bashbrew -mod vendor ./cmd/bashbrew > /dev/null
11
+
12
+ exec " $dir /bin/bashbrew" " $@ "
Original file line number Diff line number Diff line change @@ -66,8 +66,7 @@ func main() {
66
66
app := cli .NewApp ()
67
67
app .Name = "bashbrew"
68
68
app .Usage = "canonical build tool for the official images"
69
- app .Version = "dev"
70
- app .HideVersion = true
69
+ app .Version = version
71
70
app .EnableBashCompletion = true
72
71
73
72
// TODO add "Description" to app and commands (for longer-form description of their functionality)
Original file line number Diff line number Diff line change
1
+ package main
2
+
3
+ const version = "v0.1.0"
You can’t perform that action at this time.
0 commit comments