Skip to content

Commit

Permalink
Merge branch 'main' into bugfix/jjbustamante/issue-1286
Browse files Browse the repository at this point in the history
  • Loading branch information
jjbustamante authored Dec 20, 2023
2 parents 3c598f4 + d9fddda commit 4738eb2
Show file tree
Hide file tree
Showing 19 changed files with 263 additions and 141 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/delivery-archlinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Determine version
uses: actions/github-script@v6
uses: actions/github-script@v7
id: version
with:
result-encoding: string
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Determine version
uses: actions/github-script@v6
uses: actions/github-script@v7
id: version
with:
result-encoding: string
Expand All @@ -95,7 +95,7 @@ jobs:
mkdir -p ${{ env.PACKAGE_NAME }}/
cp .github/workflows/delivery/archlinux/${{ env.PACKAGE_NAME }}/PKGBUILD ${{ env.PACKAGE_NAME }}/PKGBUILD
- name: Lookup assets
uses: actions/github-script@v6
uses: actions/github-script@v7
id: assets
with:
script: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/delivery-chocolatey.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Determine version
uses: actions/github-script@v6
uses: actions/github-script@v7
id: version
with:
result-encoding: string
Expand All @@ -40,7 +40,7 @@ jobs:
return updatedTag;
- name: Setup working dir
run: |
mkdir ${{ env.CHOCO_PATH }}
mkdir -p ${{ env.CHOCO_PATH }}/source
cp -r .github/workflows/delivery/chocolatey/. ${{ env.CHOCO_PATH }}/
ls -R ${{ env.CHOCO_PATH }}
- name: Download and unzip Pack (Windows)
Expand Down Expand Up @@ -69,18 +69,18 @@ jobs:
- name: build-release
uses: crazy-max/ghaction-chocolatey@v3
with:
args: pack ${{ env.CHOCO_PATH }}/pack.nuspec --outputdirectory ${{ env.CHOCO_PATH}}
args: pack ${{ env.CHOCO_PATH }}/pack.nuspec --outputdirectory ${{ env.CHOCO_PATH}}/source
- name: list files
run: |
ls ${{ env.CHOCO_PATH }}
ls ${{ env.CHOCO_PATH }}/tools
- name: Test Release
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install pack -s ${{ env.CHOCO_PATH }}/pack.${{ env.PACK_VERSION }}.nupkg
args: install pack -s ${{ env.CHOCO_PATH }}/source
- name: Ensure Pack Installed
run: pack help
- name: Upload Release
uses: crazy-max/ghaction-chocolatey@v3
with:
args: push ${{ env.CHOCO_PATH }}/pack.${{ env.PACK_VERSION }}.nupkg -s https://push.chocolatey.org/ -k ${{ secrets.CHOCO_KEY }}
args: push ${{ env.CHOCO_PATH }}/source/pack.${{ env.PACK_VERSION }}.nupkg -s https://push.chocolatey.org/ -k ${{ secrets.CHOCO_KEY }}
4 changes: 2 additions & 2 deletions .github/workflows/delivery-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Determine version
uses: actions/github-script@v6
uses: actions/github-script@v7
id: version
with:
result-encoding: string
Expand All @@ -60,7 +60,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: buildpacks/github-actions/[email protected].0
- uses: buildpacks/github-actions/[email protected].1
- name: Buildx Build/Publish
run: |
docker buildx build . \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/delivery-homebrew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Copy pack.rb
run: cp .github/workflows/delivery/homebrew/pack.rb homebrew-tap/Formula/pack.rb
- name: Lookup assets
uses: actions/github-script@v6
uses: actions/github-script@v7
id: assets
with:
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/delivery-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
echo "date=$(date +"%a, %d %b %Y %T %z")" >> $GITHUB_OUTPUT
- name: Determine version
uses: actions/github-script@v6
uses: actions/github-script@v7
id: version
with:
result-encoding: string
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/privileged-pr-process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@main
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
add-milestone:
runs-on: ubuntu-latest
steps:
- name: Add milestone
uses: actions/github-script@v6
uses: actions/github-script@v7
id: assets
with:
script: |
Expand Down
2 changes: 1 addition & 1 deletion acceptance/acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
"github.com/buildpacks/lifecycle/api"
dockertypes "github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/ghodss/yaml"
"github.com/google/go-containerregistry/pkg/name"
"github.com/pelletier/go-toml"
"github.com/sclevine/spec"
"github.com/sclevine/spec/report"
yaml "gopkg.in/yaml.v3"

"github.com/buildpacks/pack/acceptance/assertions"
"github.com/buildpacks/pack/acceptance/buildpacks"
Expand Down
18 changes: 10 additions & 8 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,16 @@ func NewPackCommand(logger ConfigurableLogger) (*cobra.Command, error) {
Short: "CLI for building apps using Cloud Native Buildpacks",
PersistentPreRun: func(cmd *cobra.Command, args []string) {
if fs := cmd.Flags(); fs != nil {
if flag, err := fs.GetBool("no-color"); err == nil && flag {
color.Disable(flag)
if forceColor, err := fs.GetBool("force-color"); err == nil && !forceColor {
if flag, err := fs.GetBool("no-color"); err == nil && flag {
color.Disable(flag)
}

_, canDisplayColor := term.IsTerminal(logging.GetWriterForLevel(logger, logging.InfoLevel))
if !canDisplayColor {
color.Disable(true)
}
}

_, canDisplayColor := term.IsTerminal(logging.GetWriterForLevel(logger, logging.InfoLevel))
if !canDisplayColor {
color.Disable(true)
}

if flag, err := fs.GetBool("quiet"); err == nil {
logger.WantQuiet(flag)
}
Expand All @@ -68,6 +69,7 @@ func NewPackCommand(logger ConfigurableLogger) (*cobra.Command, error) {
}

rootCmd.PersistentFlags().Bool("no-color", false, "Disable color output")
rootCmd.PersistentFlags().Bool("force-color", false, "Force color output")
rootCmd.PersistentFlags().Bool("timestamps", false, "Enable timestamps in output")
rootCmd.PersistentFlags().BoolP("quiet", "q", false, "Show less output")
rootCmd.PersistentFlags().BoolP("verbose", "v", false, "Show more output")
Expand Down
27 changes: 12 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,29 @@ require (
github.com/docker/go-connections v0.4.0
github.com/dustin/go-humanize v1.0.1
github.com/gdamore/tcell/v2 v2.6.0
github.com/ghodss/yaml v1.0.0
github.com/go-git/go-git/v5 v5.10.0
github.com/go-git/go-git/v5 v5.10.1
github.com/golang/mock v1.6.0
github.com/google/go-cmp v0.6.0
github.com/google/go-containerregistry v0.16.1
github.com/google/go-github/v30 v30.1.0
github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95
github.com/heroku/color v0.0.6
github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e
github.com/onsi/gomega v1.29.0
github.com/onsi/gomega v1.30.0
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.1.0-rc5
github.com/pelletier/go-toml v1.9.5
github.com/pkg/errors v0.9.1
github.com/rivo/tview v0.0.0-20220307222120-9994674d60a8
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
github.com/sclevine/spec v1.4.0
github.com/spf13/cobra v1.7.0
golang.org/x/crypto v0.14.0
golang.org/x/mod v0.13.0
golang.org/x/oauth2 v0.13.0
golang.org/x/sync v0.4.0
golang.org/x/term v0.13.0
golang.org/x/text v0.13.0
github.com/spf13/cobra v1.8.0
golang.org/x/crypto v0.16.0
golang.org/x/mod v0.14.0
golang.org/x/oauth2 v0.15.0
golang.org/x/sync v0.5.0
golang.org/x/term v0.15.0
golang.org/x/text v0.14.0
gopkg.in/yaml.v3 v3.0.1
)

Expand All @@ -52,7 +51,6 @@ require (
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
github.com/acomagu/bufpipe v1.0.4 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/aws/aws-sdk-go-v2 v1.18.1 // indirect
github.com/aws/aws-sdk-go-v2/config v1.18.27 // indirect
Expand Down Expand Up @@ -110,17 +108,16 @@ require (
github.com/rivo/uniseg v0.4.3 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/skeema/knownhosts v1.2.0 // indirect
github.com/skeema/knownhosts v1.2.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/vbatts/tar-split v0.11.3 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/tools v0.13.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gotest.tools/v3 v3.4.0 // indirect
)

Expand Down
Loading

0 comments on commit 4738eb2

Please sign in to comment.