Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

Commit

Permalink
allow multiple heroku install directives
Browse files Browse the repository at this point in the history
  • Loading branch information
zkrzyzanowski authored Jan 3, 2023
1 parent cbfce73 commit 61f9ef6
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 8 deletions.
27 changes: 27 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Overview

A brief description of the change

## Story

[#12345](https://www.pivotaltracker.com/story/show/12345)

## Things That I Tested

List out any scenarios or items that were tested manually

## Where More Testing Might Be Necessary

List any outliers, edge cases or potential side effects from this change

## Implementation Notes

Any technical decisions, thoughts, concerns, etc

## Dependencies

List any stories, tasks or other PRs that might block this change from being merged

## Code Review Best Practices

Use [code best practices](https://github.com/b-lab-org/assessment-api/wiki/engineering-code-best-practices) for PR reviews
12 changes: 8 additions & 4 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,10 @@ setupGOPATH() {
}

installPkgs() {
step "Running: go install -v ${FLAGS[@]} ${pkgs}"
go install -v "${FLAGS[@]}" ${pkgs} 2>&1
for pkg in ${pkgs}; do
step "Running: go install -v ${FLAGS[@]} ${pkg}"
go install -v "${FLAGS[@]}" ${pkg} 2>&1
done
}

loadEnvDir "${env_dir}"
Expand Down Expand Up @@ -489,7 +491,8 @@ case "${TOOL}" in
fi

step "Determining packages to install"
pkgs=${GO_INSTALL_PACKAGE_SPEC:-$(awk '{ if ($1 == "//" && $2 == "+heroku" && $3 == "install" ) { print substr($0, index($0,$4)); exit }}' ${goMOD})}
pkgs=${GO_INSTALL_PACKAGE_SPEC:-$(awk '{ if ($1 == "//" && $2 == "+heroku" && $3 == "install" ) { print substr($0, index($0,$4)); }}' ${goMOD})}

if [ -z "${pkgs}" ]; then
pkgs=$(mainPackagesInModule)
if [ -z "${pkgs}" ]; then
Expand Down Expand Up @@ -560,7 +563,8 @@ case "${TOOL}" in
fi

step "Determining packages to install"
pkgs=${GO_INSTALL_PACKAGE_SPEC:-$(awk '{ if ($1 == "//" && $2 == "+heroku" && $3 == "install" ) { print substr($0, index($0,$4)); exit }}' ${goWork})}
pkgs=${GO_INSTALL_PACKAGE_SPEC:-$(awk '{ if ($1 == "//" && $2 == "+heroku" && $3 == "install" ) { print substr($0, index($0,$4)); }}' ${goWork})}

if [ -z "${pkgs}" ]; then
pkgs=$(mainPackagesInModule)
if [ -z "${pkgs}" ]; then
Expand Down
10 changes: 6 additions & 4 deletions test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,8 @@ testGlideMassageVendor() {
assertCaptured "Installing go"
assertCaptured "Installing glide"
assertCaptured "Fetching any unsaved dependencies (glide install)"
assertCaptured "Running: go install -v -tags heroku . github.com/heroku/fixture/vendor/github.com/mattes/migrate"
assertCaptured "Running: go install -v -tags heroku ."
assertCaptured "Running: go install -v -tags heroku github.com/heroku/fixture/vendor/github.com/mattes/migrate"
assertCaptured "github.com/heroku/fixture"
assertCaptured "github.com/heroku/fixture/vendor/github.com/fatih/color/vendor/github.com/mattn/go-colorable"
assertCaptured "github.com/heroku/fixture/vendor/github.com/fatih/color/vendor/github.com/mattn/go-isatty"
Expand Down Expand Up @@ -1051,7 +1052,7 @@ testGodepBasicGo14() {
assertBuildDirFileExists ".profile.d/concurrency.sh"
}

testGodepCGOVendored(){
testGodepCGOVendored() {
fixture "godep-cgo-vendored"

env "CGO_CFLAGS" '-I${build_dir}/vendor/include'
Expand All @@ -1076,8 +1077,9 @@ testGodepMassageVendor() {
compile
assertCaptured "Checking Godeps/Godeps.json file."
assertCaptured "Installing go"
assertCaptured "Running: go install -v -tags heroku . github.com/heroku/fixture/vendor/github.com/mattes/migrate"
assertCaptured "Running: go install -v -tags heroku ."
assertCaptured "github.com/heroku/fixture"
assertCaptured "Running: go install -v -tags heroku github.com/heroku/fixture/vendor/github.com/mattes/migrate"
assertCaptured "github.com/heroku/fixture/vendor/github.com/mattn/go-isatty"
assertCaptured "github.com/heroku/fixture/vendor/github.com/shiena/ansicolor"
assertCaptured "github.com/heroku/fixture/vendor/github.com/fatih/color"
Expand Down Expand Up @@ -1253,7 +1255,7 @@ testGodepLDSymbolValue() {
assertCapturedSuccess
assertCompiledBinaryExists
assertCompiledBinaryOutputs "fixture" "fixture"
# assertTrue "Binary has the right value" '[ "$(${compile_dir}/bin/fixture)" = "fixture" ]'
# assertTrue "Binary has the right value" '[ "$(${compile_dir}/bin/fixture)" = "fixture" ]'
}

# # Older versions of Go have a different format for specifying linked flags
Expand Down

0 comments on commit 61f9ef6

Please sign in to comment.