Skip to content

Commit

Permalink
fix(stencil): upgrade modules (2024-04-16) (#156)
Browse files Browse the repository at this point in the history
Co-authored-by: getoutreach-ci-1[bot] <95656460+getoutreach-ci-1[bot]@users.noreply.github.com>
  • Loading branch information
getoutreach-ci-1[bot] authored Apr 16, 2024
1 parent 6274646 commit 6470cf4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# syntax, such as anchors, will be fixed automatically.
version: 2.1
orbs:
shared: getoutreach/[email protected].1
shared: getoutreach/[email protected].2
queue: eddiewebb/[email protected]

parameters:
Expand Down
21 changes: 15 additions & 6 deletions scripts/devbase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,31 @@ gojq() {
local archive="$basename.$ext"

local gojqURL="https://github.com/itchyny/gojq/releases/download/$gojqVersion/$archive"
if [[ ! -e "$gjDir/$archive" ]]; then
curl --fail --location --silent --output "$gjDir/$archive" "$gojqURL"

local archivePath="$gjDir/$archive"
if [[ ! -e $archivePath ]]; then
if command -v busybox >/dev/null; then
busybox wget --quiet --output-document "$archivePath" "$gojqURL"
elif command -v wget >/dev/null; then
wget --quiet --output-document "$archivePath" "$gojqURL"
elif command -v curl >/dev/null; then
curl --fail --location --silent --output "$archivePath" "$gojqURL"
else
echo "No download tool found (looked for busybox, wget, curl)" >&2
exit 1
fi
fi

if [[ ! -e "$gjDir/$archive" ]]; then
if [[ ! -e $archivePath ]]; then
echo "Failed to download gojq ($gojqURL)" >&2
exit 1
fi

if [[ $ext == "zip" ]]; then
# Explanation of flags:
# quiet, junk paths/dont make directories, extract to directory
unzip -q -j -d "$gjDir" "$gjDir/$archive" "$basename/gojq"
unzip -q -j -d "$gjDir" "$archivePath" "$basename/gojq"
else
tar --strip-components=1 --directory="$gjDir" --extract --file="$gjDir/$archive" "$basename/gojq"
tar --strip-components=1 --directory="$gjDir" --extract --file="$archivePath" "$basename/gojq"
fi
mv "$gjDir"/gojq "$gojq"
fi
Expand Down
8 changes: 4 additions & 4 deletions stencil.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ version: v1.38.0
modules:
- name: github.com/getoutreach/devbase
url: https://github.com/getoutreach/devbase
version: v2.26.1
version: v2.26.2
- name: github.com/getoutreach/stencil-base
url: file://./
version: local
- name: github.com/getoutreach/stencil-circleci
url: https://github.com/getoutreach/stencil-circleci
version: v1.12.0
version: v1.12.1
- name: github.com/getoutreach/stencil-discovery
url: https://github.com/getoutreach/stencil-discovery
version: v1.8.2
- name: github.com/getoutreach/stencil-golang
url: https://github.com/getoutreach/stencil-golang
version: v1.21.2
version: v1.22.0
- name: github.com/getoutreach/stencil-outreach
url: https://github.com/getoutreach/stencil-outreach
version: v0.21.0
version: v0.21.1
- name: github.com/getoutreach/stencil-pipeline
url: https://github.com/getoutreach/stencil-pipeline
version: v1.1.0
Expand Down

0 comments on commit 6470cf4

Please sign in to comment.