Skip to content

Commit

Permalink
fixup: Fix version setting script and comment why its necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
marun committed May 1, 2024
1 parent d074f2d commit 908acd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/actions/set-go-version-in-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ runs:
using: composite
steps:
- name: Set the project Go version in the environment
# A script works across different platforms but attempting to replicate the script directly in
# the run statement runs into platform-specific path handling issues.
run: .github/actions/set-go-version-in-env/go_version_env.sh >> $GITHUB_ENV
shell: bash
4 changes: 2 additions & 2 deletions .github/actions/set-go-version-in-env/go_version_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -euo pipefail
# `go list -m -f '{{.GoVersion}}'` should be preferred outside of CI
# when go is already installed.

# 2 directories above this script
AVALANCHE_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd ../.. && pwd )
# 3 directories above this script
AVALANCHE_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd ../../.. && pwd )

echo GO_VERSION="~$(sed -n -e 's/^go //p' "${AVALANCHE_PATH}"/go.mod)"

0 comments on commit 908acd0

Please sign in to comment.