Skip to content

Commit

Permalink
[WORKFLOWS, DOCKER] Fix dockerfile, test dockerfile workflow, fix git…
Browse files Browse the repository at this point in the history
… describe warning, exclude CNR lint (#367)

Co-authored-by: Mohamed Elmoslemany <[email protected]>
  • Loading branch information
evlekht and mo-c4t authored Aug 7, 2024
1 parent f0e309b commit eb09c88
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ run:
skip-files:
- ".*\\.pb\\.go$"
- ".*mock.*"
skip-dirs:
- "tools/camino-network-runner"

issues:
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ WORKDIR /build
# Copy and download caminogo dependencies using go mod
COPY go.mod .
COPY go.sum .
COPY dependencies dependencies/
RUN go mod download

# Copy the code into the container
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_camino.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ mkdir -p $plugin_dir

# Exit build successfully if the binaries are created
if [[ -f "$caminogo_path" ]]; then
ln -s caminogo $camino_node_symlink_path
ln -sf caminogo $camino_node_symlink_path
echo "Build Successful"
exit 0
else
Expand Down
9 changes: 5 additions & 4 deletions scripts/constants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
#
# Use lower_case variables in the scripts and UPPER_CASE variables for override
# Use the constants.sh for env overrides
# Use the versions.sh to specify versions
#

# Set the PATHS
GOPATH="$(go env GOPATH)"
CAMINOGO_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd .. && pwd )

# Where CaminoGo binary goes
build_dir="$CAMINOGO_PATH/build"
Expand All @@ -21,11 +20,13 @@ plugin_dir="$build_dir/plugins"
camino_node_dockerhub_repo=${DOCKER_REPO:-"c4tplatform"}"/camino-node"

# Current branch
current_branch=$(git symbolic-ref -q --short HEAD || git describe --tags || echo unknown)
current_branch_temp=$(git symbolic-ref -q --short HEAD || git describe --tags --always || echo unknown)
# replace / with - to be a docker tag compatible
current_branch=${current_branch_temp////-}

# caminogo and caminoethvm git tag and sha
git_commit=${CAMINO_NODE_COMMIT:-$(git rev-parse --short HEAD)}
git_tag=${CAMINO_NODE_TAG:-$(git describe --tags --abbrev=0 || echo unknown)}
git_tag=${CAMINO_NODE_TAG:-$(git describe --tags --abbrev=0 --always || echo unknown)}
caminoethvm_tag=${CAMINO_ETHVM_VERSION:-'v1.1.0-rc4'}
caminoethvm_commit=${CAMINOETHVM_COMMIT:-'07e50749e3c371001c92dff14dc91ef6109a368a'}

Expand Down

0 comments on commit eb09c88

Please sign in to comment.