Skip to content

Commit

Permalink
Merge branch 'refactor/daemon-newable' of github.com:mesg-foundation/…
Browse files Browse the repository at this point in the history
…core into refactor/daemon-newable
  • Loading branch information
krhubert committed Nov 28, 2018
2 parents 3cd80b6 + 6ec058b commit 48bc289
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates=20180409 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY ./bin/core .
CMD [ "./core" ]
2 changes: 1 addition & 1 deletion dev-cli
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
VERSION="local"
LDFLAGS="-X 'github.com/mesg-foundation/core/version.Version=$VERSION'"

go run $LDFLAGS interface/cli/main.go $@
go run -ldflags="$LDFLAGS" interface/cli/main.go $@
16 changes: 14 additions & 2 deletions dev-core
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ go build -o ./bin/cli -ldflags="$LDFLAGS" interface/cli/main.go
CORE_SUM_PATH="./bin/.core.sum"
touch "$CORE_SUM_PATH"

# check if core bin was is cached
DOCKER_SUM_PATH="./bin/.Dockerfile.dev.sum"
touch "$DOCKER_SUM_PATH"

# check if core bin was cached
CORE_SUM="$(openssl md5 ./bin/core)"
CORE_SUM_PREV="$(cat $CORE_SUM_PATH)"
if [[ "$CORE_SUM" == "$CORE_SUM_PREV" ]]; then
Expand All @@ -23,13 +26,22 @@ else
echo "$CORE_SUM" > "$CORE_SUM_PATH"
fi

# check if dockerfile was cached
DOCKER_SUM="$(openssl md5 ./Dockerfile.dev)"
DOCKER_SUM_PREV="$(cat $DOCKER_SUM_PATH)"
if [[ "$DOCKER_SUM" == "$DOCKER_SUM_PREV" ]]; then
DOCKERCACHED=true
else
echo "$DOCKER_SUM" > "$DOCKER_SUM_PATH"
fi

# create a symlink for system services.
rm -rf "$HOME/.mesg/systemservices"
mkdir -p "$HOME/.mesg/"
ln -s "$DIR/src/github.com/mesg-foundation/core/systemservices/sources" "$HOME/.mesg/systemservices"

echo "build mesg/core image"
if [[ ! $BINCACHED ]]; then
if [[ ! $BINCACHED ]] || [[ ! $DOCKERCACHED ]]; then
docker build -f Dockerfile.dev -t "mesg/core:$VERSION" .
fi

Expand Down
4 changes: 2 additions & 2 deletions systemservices/systemservices.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const (
// SystemServicesList is the list of system services.
// system services will be created from this list.
var SystemServicesList = []string{
ResolverService,
WorkflowService,
// ResolverService,
// WorkflowService,
}

// systemService represents a system service.
Expand Down

0 comments on commit 48bc289

Please sign in to comment.