Skip to content

Commit

Permalink
remove go flag from distribution build script (#727)
Browse files Browse the repository at this point in the history
* remove go flag from distribution build script

in open-telemetry/opentelemetry-collector#11576 we removed flag `--go` but this script will fail if builder v0.113.0 is used to build and release v0.113.0 distributions

* remove -g flag from build.sh refs

---------

Co-authored-by: Daniel Jaglowski <jaglows3@gmail.com>
  • Loading branch information
jackgopack4 and djaglowski authored Nov 6, 2024
1 parent 2df84d1 commit ad9097b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ ci: check build
check: ensure-goreleaser-up-to-date

build: go ocb
@./scripts/build.sh -d "${DISTRIBUTIONS}" -b ${OTELCOL_BUILDER} -g ${GO}
@./scripts/build.sh -d "${DISTRIBUTIONS}" -b ${OTELCOL_BUILDER}

generate: generate-sources generate-goreleaser

generate-goreleaser: go
@./scripts/generate-goreleaser.sh -d "${GEN_CONFIG_DISTRIBUTIONS}" -g ${GO}

generate-sources: go ocb
@./scripts/build.sh -d "${DISTRIBUTIONS}" -s true -b ${OTELCOL_BUILDER} -g ${GO}
@./scripts/build.sh -d "${DISTRIBUTIONS}" -s true -b ${OTELCOL_BUILDER}

goreleaser-verify: goreleaser
@${GORELEASER} release --snapshot --clean
Expand Down
7 changes: 2 additions & 5 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

REPO_DIR="$( cd "$(dirname "$( dirname "${BASH_SOURCE[0]}" )")" &> /dev/null && pwd )"
BUILDER=''
GO=''

# default values
skipcompilation=false
Expand All @@ -13,13 +12,11 @@ do
d) distributions=${OPTARG};;
s) skipcompilation=${OPTARG};;
b) BUILDER=${OPTARG};;
g) GO=${OPTARG};;
*) exit 1;;
esac
done

[[ -n "$BUILDER" ]] || BUILDER='ocb'
[[ -n "$GO" ]] || GO='go'

if [[ -z $distributions ]]; then
echo "List of distributions to build not provided. Use '-d' to specify the names of the distributions to build. Ex.:"
Expand All @@ -40,9 +37,9 @@ do

echo "Building: $distribution"
echo "Using Builder: $(command -v "$BUILDER")"
echo "Using Go: $(command -v "$GO")"
echo "Using Go: $(command -v go)"

if "$BUILDER" --skip-compilation="${skipcompilation}" --go "$GO" --config manifest.yaml > _build/build.log 2>&1; then
if "$BUILDER" --skip-compilation="${skipcompilation}" --config manifest.yaml > _build/build.log 2>&1; then
echo "✅ SUCCESS: distribution '${distribution}' built."
else
echo "❌ ERROR: failed to build the distribution '${distribution}'."
Expand Down

0 comments on commit ad9097b

Please sign in to comment.