Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCKER, WORKFLOWS] Fix dockerfile, fix already existing symbolic link error, exclude CNR from lint #367

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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