Skip to content

Commit

Permalink
fix Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed Jul 3, 2017
1 parent 9e8f8ee commit 9d0d2b2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ VERSION=$(shell cat VERSION)
all: build size test

dev:
docker build -t $(REPO)/$(NAME):dev -f Dockerfile.dev .
docker build -t $(ORG)/$(NAME):dev -f Dockerfile.dev .

build:
docker build -t $(REPO)/$(NAME):$(VERSION) .
docker build -t $(ORG)/$(NAME):$(VERSION) .

size:
sed -i.bu 's/docker image-.*-blue/docker image-$(shell docker images --format "{{.Size}}" $(REPO)/$(NAME):$(VERSION))-blue/' README.md
sed -i.bu 's/docker image-.*-blue/docker image-$(shell docker images --format "{{.Size}}" $(ORG)/$(NAME):$(VERSION))-blue/' README.md

tags:
docker images --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}" $(REPO)/$(NAME)
docker images --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}" $(ORG)/$(NAME)

tar: build
docker save $(REPO)/$(NAME):$(VERSION) -o wdef.tar
docker save $(ORG)/$(NAME):$(VERSION) -o wdef.tar

test:
docker run --init --rm $(ORG)/$(NAME):$(VERSION) --help
Expand Down
4 changes: 4 additions & 0 deletions SAMPLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#### Windows Defender
| Infected | Result | Engine | Updated |
|:---------------:|:-------------:|:-------------:|:--------------:|
| true | Virus:DOS/EICAR_Test_File | 0.1.0 | 20170703 |
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@ Vagrant.configure("2") do |config|
curl -s https://raw.githubusercontent.com/ZZROTDesign/docker-clean/v2.0.4/docker-clean | sudo tee /usr/local/bin/docker-clean > /dev/null
sudo chmod +x /usr/local/bin/docker-clean
echo "Installing windows-defender image ================"
docker load /vagrant/wdef.tar
docker load -i /vagrant/wdef.tar
SHELL
end
2 changes: 1 addition & 1 deletion template.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
const tpl = `#### Windows Defender
{{- with .Results }}
| Infected | Result | Engine | Updated |
|---------------|-------------|-------------|--------------|
|:-------------:|:-----------:|:-----------:|:------------:|
| {{.Infected}} | {{.Result}} | {{.Engine}} | {{.Updated}} |
{{ end -}}
`

0 comments on commit 9d0d2b2

Please sign in to comment.