Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #3 from paketo-community/github-config-ef3ea59
Browse files Browse the repository at this point in the history
Update shared github-config
  • Loading branch information
ryanmoran authored Jun 19, 2020
2 parents af18d74 + 3333ca4 commit 9104802
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 20 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
version: 2
updates:
- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
14 changes: 0 additions & 14 deletions .github/util/tag.sh

This file was deleted.

12 changes: 12 additions & 0 deletions .mergify/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
pull_request_rules:
- name: Auto merge pull requests from github-actions bot
conditions:
- author=github-actions[bot]
# TODO: Fill in these conditions when they are finalized
# - status-success=Unit Tests
# - status-success=Integration Tests
actions:
merge:
strict: true
method: rebase
delete_head_branch: {}
4 changes: 1 addition & 3 deletions scripts/.util/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ function util::tools::path::export() {
}

function util::tools::jam::install () {
echo "-> Installing v0.0.10 jam..."

local dir
while [[ "${#}" != 0 ]]; do
case "${1}" in
Expand Down Expand Up @@ -55,7 +53,7 @@ function util::tools::jam::install () {

if [[ ! -f "${dir}/jam" ]]; then
local version
version="v0.0.10"
version="v0.0.14"

util::print::title "Installing jam ${version}"
curl "https://github.com/paketo-buildpacks/packit/releases/download/${version}/jam-${os}" \
Expand Down
22 changes: 22 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,28 @@ function main() {
popd > /dev/null || return
fi

if [[ -f "${BUILDPACKDIR}/main.go" ]]; then
pushd "${BUILDPACKDIR}/bin" > /dev/null || return
printf "%s" "Building run..."

GOOS=linux \
go build \
-ldflags="-s -w" \
-o "run" \
"${BUILDPACKDIR}"

echo "Success!"

for name in detect build; do
printf "%s" "Linking ${name}..."

ln -sf "run" "${name}"

echo "Success!"
done
popd > /dev/null || return
fi

if [[ -d "${BUILDPACKDIR}/cmd" ]]; then
local name
for src in "${BUILDPACKDIR}"/cmd/*; do
Expand Down
2 changes: 1 addition & 1 deletion scripts/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function token::fetch() {
function tests::run() {
util::print::title "Run Buildpack Runtime Integration Tests"
pushd "${BUILDPACKDIR}" > /dev/null
if GOMAXPROCS=4 go test -timeout 0 ./integration/... -v -run Integration; then
if GOMAXPROCS="${GOMAXPROCS:-4}" go test -count=1 -timeout 0 ./integration/... -v -run Integration; then
util::print::success "** GO Test Succeeded **"
else
util::print::error "** GO Test Failed **"
Expand Down
4 changes: 2 additions & 2 deletions scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ function main() {
#use jam
util::tools::jam::install --directory "${BUILDPACKDIR}/.bin"
if [[ -z "${version:-}" ]]; then #version not provided, use latest git tag
git_tag=$(git describe --tags "$(git rev-list --tags --max-count=1)" || echo "v0.0.0")
version=${git_tag:1}
git_tag=$(git describe --tags "$(git rev-list --tags --max-count=1)" || echo "v0.0.0")
version=${git_tag:1}
fi

extra_args=""
Expand Down

0 comments on commit 9104802

Please sign in to comment.