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

Commit

Permalink
BUILD: WORKING COMMIT - DELETE
Browse files Browse the repository at this point in the history
  • Loading branch information
Callum Bodels committed Dec 20, 2023
1 parent 5329ac4 commit adafc81
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@

# Generated by Go coverage.
*.out

# Generated by GoReleaser.
dist/
16 changes: 16 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# The lines below are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

version: 1

builds:
-
main: ./cmd/starling-bank-technical-challenge
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
4 changes: 2 additions & 2 deletions ci/check-yaml-formatting.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

set -o errexit
set -o xtrace

yamlfmt -lint -dstar .github/**/*
yamlfmt -lint -dstar .github/**/* .goreleaser.yaml
2 changes: 1 addition & 1 deletion ci/fix-yaml-formatting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
set -o errexit
set -o xtrace

yamlfmt -dstar ./github/**/*
yamlfmt -dstar ./github/**/* .goreleaser.yaml
22 changes: 22 additions & 0 deletions ci/release-artifacts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env sh

set -o errexit
set -o xtrace

# Iterate through the array
for row in $(jq -c '.[]' "dist/artifacts.json"); do
goos=$(echo "${row}" | jq -r '.goos')
goarch=$(echo "${row}" | jq -r '.goarch')
goamd64=$(echo "${row}" | jq -r '.goamd64 // empty')

# Append goamd64 to command_name if provided.
if [ -n "${goamd64}" ]; then
command_name="${goos}_${goarch}_${goamd64}"
else
command_name="${goos}_${goarch}"
fi

path=$(echo "${row}" | jq -r '.path')

echo "${command_name} ${path}"
done

0 comments on commit adafc81

Please sign in to comment.