Skip to content

Commit fe363aa

Browse files
committed
*: move to opencontainers/image-tools
Signed-off-by: Antonio Murdaca <[email protected]>
1 parent b5b3f3c commit fe363aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+754
-8262
lines changed

.gitignore

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
code-of-conduct.md
2-
/oci-image-tool
3-
/oci-validate-examples
4-
output
1+
/oci-create-runtime-bundle
2+
/oci-unpack
3+
/oci-image-validate

.tool/lint

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ for d in $(find . -type d -not -iwholename '*.git*' -a -not -iname '.tool' -a -n
1515
--exclude='.*_test\.go:.*error return value not checked.*\(errcheck\)$' \
1616
--exclude='duplicate of.*_test.go.*\(dupl\)$' \
1717
--exclude='schema/fs.go' \
18+
--exclude='duplicate of.*main.go.*\(dupl\)$' \
1819
--disable=aligncheck \
1920
--disable=gotype \
2021
--disable=gas \

.travis.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
language: go
22
go:
33
- 1.6
4+
- 1.7
45

56
sudo: required
67

7-
services:
8-
- docker
9-
108
before_script:
119
- export PATH=$HOME/gopath/bin:$PATH
1210

1311
before_install:
14-
- docker pull vbatts/pandoc
1512
- make install.tools
1613
- go get -u github.com/alecthomas/gometalinter
1714
- gometalinter --install --update
@@ -24,5 +21,4 @@ script:
2421
- make lint
2522
- make check-license
2623
- make test
27-
- make oci-image-tool
28-
- make docs
24+
- make tools

ChangeLog

Lines changed: 0 additions & 19 deletions
This file was deleted.

HACKING.md

Lines changed: 0 additions & 124 deletions
This file was deleted.

Makefile

Lines changed: 15 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,28 @@
11
GO15VENDOREXPERIMENT=1
22
export GO15VENDOREXPERIMENT
33

4-
DOCKER ?= $(shell command -v docker 2>/dev/null)
5-
PANDOC ?= $(shell command -v pandoc 2>/dev/null)
6-
7-
ifeq "$(strip $(PANDOC))" ''
8-
ifneq "$(strip $(DOCKER))" ''
9-
PANDOC = $(DOCKER) run \
10-
-it \
11-
--rm \
12-
-v $(shell pwd)/:/input/:ro \
13-
-v $(shell pwd)/$(OUTPUT_DIRNAME)/:/$(OUTPUT_DIRNAME)/ \
14-
-u $(shell id -u) \
15-
--workdir /input \
16-
vbatts/pandoc
17-
PANDOC_SRC := /input/
18-
PANDOC_DST := /
19-
endif
20-
endif
21-
22-
# These docs are in an order that determines how they show up in the PDF/HTML docs.
23-
DOC_FILES := \
24-
README.md \
25-
code-of-conduct.md \
26-
project.md \
27-
media-types.md \
28-
descriptor.md \
29-
image-layout.md \
30-
layer.md \
31-
config.md \
32-
manifest.md
33-
34-
FIGURE_FILES := \
35-
img/media-types.png
36-
37-
OUTPUT_DIRNAME ?= output/
38-
DOC_FILENAME ?= oci-image-spec
39-
404
EPOCH_TEST_COMMIT ?= v0.2.0
415

426
default: help
437

448
help:
459
@echo "Usage: make <target>"
4610
@echo
47-
@echo " * 'docs' - produce document in the $(OUTPUT_DIRNAME) directory"
48-
@echo " * 'fmt' - format the json with indentation"
49-
@echo " * 'validate-examples' - validate the examples in the specification markdown files"
50-
@echo " * 'oci-image-tool' - build the oci-image-tool binary"
51-
@echo " * 'schema-fs' - regenerate the virtual schema http/FileSystem"
11+
@echo " * 'tools' - build the oci image tools binaries"
5212
@echo " * 'check-license' - check license headers in source files"
5313
@echo " * 'lint' - Execute the source code linter"
5414
@echo " * 'test' - Execute the unit tests"
5515
@echo " * 'update-deps' - Update vendored dependencies"
56-
@echo " * 'img/*.png' - Generate PNG from dot file"
57-
58-
fmt:
59-
for i in schema/*.json ; do jq --indent 2 -M . "$${i}" > xx && cat xx > "$${i}" && rm xx ; done
60-
61-
docs: $(OUTPUT_DIRNAME)/$(DOC_FILENAME).pdf $(OUTPUT_DIRNAME)/$(DOC_FILENAME).html
62-
63-
ifeq "$(strip $(PANDOC))" ''
64-
$(OUTPUT_DIRNAME)/$(DOC_FILENAME).pdf: $(DOC_FILES) $(FIGURE_FILES)
65-
$(error cannot build $@ without either pandoc or docker)
66-
else
67-
$(OUTPUT_DIRNAME)/$(DOC_FILENAME).pdf: $(DOC_FILES) $(FIGURE_FILES)
68-
@mkdir -p $(OUTPUT_DIRNAME)/ && \
69-
$(PANDOC) -f markdown_github -t latex -o $(PANDOC_DST)$@ $(patsubst %,$(PANDOC_SRC)%,$(DOC_FILES))
70-
ls -sh $(shell readlink -f $@)
71-
72-
$(OUTPUT_DIRNAME)/$(DOC_FILENAME).html: $(DOC_FILES) $(FIGURE_FILES)
73-
@mkdir -p $(OUTPUT_DIRNAME)/ && \
74-
cp -ap img/ $(shell pwd)/$(OUTPUT_DIRNAME)/&& \
75-
$(PANDOC) -f markdown_github -t html5 -o $(PANDOC_DST)$@ $(patsubst %,$(PANDOC_SRC)%,$(DOC_FILES))
76-
ls -sh $(shell readlink -f $@)
77-
endif
78-
79-
code-of-conduct.md:
80-
curl -o $@ https://raw.githubusercontent.com/opencontainers/tob/d2f9d68c1332870e40693fe077d311e0742bc73d/code-of-conduct.md
81-
82-
validate-examples:
83-
go test -run TestValidate ./schema
84-
85-
oci-image-tool:
86-
go build ./cmd/oci-image-tool
87-
88-
schema-fs:
89-
@echo "generating schema fs"
90-
@cd schema && printf "%s\n\n%s\n" "$$(cat ../.header)" "$$(go generate)" > fs.go
9116

9217
check-license:
9318
@echo "checking license headers"
9419
@./.tool/check-license
9520

21+
tools:
22+
go build ./cmd/oci-create-runtime-bundle
23+
go build ./cmd/oci-unpack
24+
go build ./cmd/oci-image-validate
25+
9626
lint:
9727
@echo "checking lint"
9828
@./.tool/lint
@@ -108,9 +38,6 @@ update-deps:
10838
# see http://sed.sourceforge.net/sed1line.txt
10939
find vendor -type f -exec sed -i -e :a -e '/^\n*$$/{$$d;N;ba' -e '}' "{}" \;
11040

111-
img/%.png: img/%.dot
112-
dot -Tpng $^ > $@
113-
11441
.PHONY: .gitvalidation
11542

11643
# When this is running in travis, it will only check the travis commit range
@@ -124,7 +51,7 @@ endif
12451

12552
.PHONY: install.tools
12653

127-
install.tools: .install.gitvalidation .install.glide .install.glide-vc
54+
install.tools: .install.gitvalidation .install.glide .install.glide-vc .install.gometalinter
12855

12956
.install.gitvalidation:
13057
go get github.com/vbatts/git-validation
@@ -135,15 +62,19 @@ install.tools: .install.gitvalidation .install.glide .install.glide-vc
13562
.install.glide-vc:
13663
go get github.com/sgotti/glide-vc
13764

65+
.install.gometalinter:
66+
go get github.com/alecthomas/gometalinter
67+
gometalinter --install --update
68+
13869
clean:
13970
rm -rf *~ $(OUTPUT_DIRNAME)
140-
rm -f oci-image-tool
71+
rm -f oci-create-runtime-bundle
72+
rm -f oci-unpack
73+
rm -f oci-image-validate
14174

14275
.PHONY: \
143-
validate-examples \
144-
oci-image-tool \
76+
tools \
14577
check-license \
14678
clean \
14779
lint \
148-
docs \
14980
test

0 commit comments

Comments
 (0)