Skip to content

Commit

Permalink
restructure
Browse files Browse the repository at this point in the history
  • Loading branch information
kcq committed Aug 7, 2017
1 parent ba2736c commit 6df60f9
Show file tree
Hide file tree
Showing 16 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Dockerfile-build
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:latest
RUN mkdir -p /go/src/github.com/docker-slim/docker-slim
ADD . /go/src/github.com/docker-slim/docker-slim
WORKDIR /go/src/github.com/docker-slim/docker-slim/apps/docker-slim
WORKDIR /go/src/github.com/docker-slim/docker-slim/cmd/docker-slim
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o docker-slim .

WORKDIR /go/src/github.com/docker-slim/docker-slim/apps/docker-slim-sensor
WORKDIR /go/src/github.com/docker-slim/docker-slim/cmd/docker-slim-sensor
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o docker-slim-sensor .
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build:
docker rm -f $(INSTANCE); true
docker build -f Dockerfile-build -t $(NAME)-build .
docker create --name $(INSTANCE) $(NAME)-build
docker cp $(INSTANCE):/go/src/github.com/$(NAME)/apps/docker-slim/docker-slim $(shell pwd)/docker-slim
docker cp $(INSTANCE):/go/src/github.com/$(NAME)/apps/docker-slim-sensor/docker-slim-sensor $(shell pwd)/docker-slim-sensor
docker cp $(INSTANCE):/go/src/github.com/$(NAME)/cmd/docker-slim/docker-slim $(shell pwd)/docker-slim
docker cp $(INSTANCE):/go/src/github.com/$(NAME)/cmd/docker-slim-sensor/docker-slim-sensor $(shell pwd)/docker-slim-sensor
docker rm $(INSTANCE)

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/bom.gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ echo "installing bom tool (note: requires Go 1.8+)"
go get -v -u github.com/cloudimmunity/license-bill-of-materials

pushd $BDIR_GOPATH
license-bill-of-materials github.com/docker-slim/docker-slim/apps/docker-slim > $SDIR/../lib-licenses.json
license-bill-of-materials github.com/docker-slim/docker-slim/cmd/docker-slim > $SDIR/../lib-licenses.json
popd
4 changes: 2 additions & 2 deletions scripts/src.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export CGO_ENABLED=0
source ${SDIR}/env.sh
BDIR_GOPATH=${BDIR}/_gopath/src/github.com/docker-slim/docker-slim

pushd ${BDIR_GOPATH}/apps/docker-slim
pushd ${BDIR_GOPATH}/cmd/docker-slim
BUILD_TIME="$(date -u '+%Y-%m-%d_%I:%M:%S%p')"
TAG="current"
REVISION="current"
Expand All @@ -26,7 +26,7 @@ gox -osarch="linux/amd64" -ldflags "${LD_FLAGS}" -output "${BDIR_GOPATH}/bin/lin
gox -osarch="darwin/amd64" -ldflags "${LD_FLAGS}" -output "${BDIR_GOPATH}/bin/mac/docker-slim"
#gox -osarch="linux/arm" -output "$BDIR_GOPATH/bin/linux_arm/docker-slim"
popd
pushd ${BDIR_GOPATH}/apps/docker-slim-sensor
pushd ${BDIR_GOPATH}/cmd/docker-slim-sensor
gox -osarch="linux/amd64" -output="${BDIR_GOPATH}/bin/linux/docker-slim-sensor"
#gox -osarch="linux/arm" -output "$BDIR_GOPATH/bin/linux_arm/docker-slim-sensor"
popd
Expand Down
4 changes: 2 additions & 2 deletions scripts/src.deps.and.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ mkdir -p src/github.com/docker-slim
ln -sf $BDIR src/github.com/docker-slim/docker-slim
popd

pushd $BDIR_GOPATH/apps/docker-slim
pushd $BDIR_GOPATH/cmd/docker-slim
BUILD_TIME="$(date -u '+%Y-%m-%d_%I:%M:%S%p')"
TAG="current"
revision="current"
Expand All @@ -33,7 +33,7 @@ LD_FLAGS="-X github.com/docker-slim/docker-slim/utils.appVersionTag=${TAG} -X gi
gox -osarch="linux/amd64" -ldflags "${LD_FLAGS}" -output "$BDIR_GOPATH/bin/linux/docker-slim"
gox -osarch="darwin/amd64" -ldflags "${LD_FLAGS}" -output "$BDIR_GOPATH/bin/mac/docker-slim"
popd
pushd $BDIR_GOPATH/apps/docker-slim-sensor
pushd $BDIR_GOPATH/cmd/docker-slim-sensor
gox -osarch="linux/amd64" -output="$BDIR_GOPATH/bin/linux/docker-slim-sensor"
popd
popd
2 changes: 1 addition & 1 deletion scripts/src.fmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
SDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

source $SDIR/env.sh
cd $BDIR/apps
cd $BDIR/cmd
gofmt -l -w -s .
cd $BDIR/master
gofmt -l -w -s .
Expand Down
2 changes: 1 addition & 1 deletion scripts/src.inspect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
SDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

source $SDIR/env.sh
cd $BDIR/apps
cd $BDIR/cmd
go tool vet .
golint ./...
cd $BDIR/consts
Expand Down

0 comments on commit 6df60f9

Please sign in to comment.