Skip to content

Commit

Permalink
Merge pull request #17 from amp-buildpacks/update/pipeline
Browse files Browse the repository at this point in the history
Bump pipeline from 1.37.2 to 1.37.2
  • Loading branch information
lispking authored Apr 2, 2024
2 parents f0fb9d9 + 7893853 commit f2fb9c9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) The Amphitheatre Authors. All rights reserved.
# Copyright 2018-2020 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,6 +13,8 @@
# limitations under the License.

bin/
linux/
dependencies/
package/
scratch/

28 changes: 9 additions & 19 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,29 +1,19 @@
#!/usr/bin/env bash
# Copyright (c) The Amphitheatre Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -euo pipefail

GOOS="linux" go build -ldflags='-s -w' -o bin/main github.com/amp-buildpacks/foundry/cmd/main
GOMOD=$(head -1 go.mod | awk '{print $2}')
GOOS="linux" go build -ldflags='-s -w' -o linux/amd64/bin/main "$GOMOD/cmd/main"
GOOS="linux" GOARCH="arm64" go build -ldflags='-s -w' -o linux/arm64/bin/main "$GOMOD/cmd/main"

if [ "${STRIP:-false}" != "false" ]; then
strip bin/main
strip linux/amd64/bin/main linux/arm64/bin/main
fi

if [ "${COMPRESS:-none}" != "none" ]; then
$COMPRESS bin/main
$COMPRESS linux/amd64/bin/main linux/arm64/bin/main
fi

ln -fs main bin/build
ln -fs main bin/detect
ln -fs main linux/amd64/bin/build
ln -fs main linux/arm64/bin/build
ln -fs main linux/amd64/bin/detect
ln -fs main linux/arm64/bin/detect

0 comments on commit f2fb9c9

Please sign in to comment.