Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
language: [ 'go' ]
os: [ 'ubuntu-22.04' ]
go-version: [1.23]
os: [ 'ubuntu-24.04' ]
go-version: [1.24]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dockerfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
[
"./build/docker/go-tools/Dockerfile",
]
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-24.04"
name: Lint ${{ matrix.dockerfile }}
steps:
- name: Checkout
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
fail-fast: false
max-parallel: 3
matrix:
os: [ 'ubuntu-22.04' ]
go-version: [1.23]
os: [ 'ubuntu-24.04' ]
go-version: [1.24]
runs-on: ${{ matrix.os }}
name: Build
steps:
Expand Down Expand Up @@ -97,8 +97,8 @@ jobs:
fail-fast: false
max-parallel: 2
matrix:
os: [ 'ubuntu-22.04' ]
go-version: [1.23]
os: [ 'ubuntu-24.04' ]
go-version: [1.24]
runs-on: ${{ matrix.os }}
name: Run Tests
steps:
Expand Down Expand Up @@ -144,8 +144,8 @@ jobs:
fail-fast: false
max-parallel: 2
matrix:
os: [ 'ubuntu-22.04' ]
go-version: [1.23]
os: [ 'ubuntu-24.04' ]
go-version: [1.24]
runs-on: ${{ matrix.os }}
name: Run linters
steps:
Expand Down Expand Up @@ -201,8 +201,8 @@ jobs:
fail-fast: true
max-parallel: 1
matrix:
os: [ 'ubuntu-22.04' ]
go-version: [1.23]
os: [ 'ubuntu-24.04' ]
go-version: [1.24]
runs-on: ${{ matrix.os }}
name: Quality reports
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/readme-stars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
update-readme:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
USER_ID: ${{ secrets.AOC_USER_ID }}
BOARD_ID: ${{ secrets.AOC_BOARD_ID}}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
fail-fast: false
max-parallel: 2
matrix:
os: [ 'ubuntu-22.04' ]
go-version: [1.23]
os: [ 'ubuntu-24.04' ]
go-version: [1.24]
runs-on: ${{ matrix.os }}
name: Build
steps:
Expand Down Expand Up @@ -59,8 +59,8 @@ jobs:
fail-fast: false
max-parallel: 2
matrix:
os: [ 'ubuntu-22.04' ]
go-version: [1.23]
os: [ 'ubuntu-24.04' ]
go-version: [1.24]
runs-on: ${{ matrix.os }}
name: Regression tests
steps:
Expand Down Expand Up @@ -108,8 +108,8 @@ jobs:
fail-fast: false
max-parallel: 1
matrix:
os: [ 'ubuntu-22.04' ]
go-version: [1.23]
os: [ 'ubuntu-24.04' ]
go-version: [1.24]
runs-on: ${{ matrix.os }}
name: Lint
steps:
Expand Down Expand Up @@ -161,8 +161,8 @@ jobs:
fail-fast: false
max-parallel: 1
matrix:
os: [ 'ubuntu-22.04' ]
go-version: [1.23]
os: [ 'ubuntu-24.04' ]
go-version: [1.24]
runs-on: ${{ matrix.os }}
name: Release
steps:
Expand Down
16 changes: 6 additions & 10 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,15 @@ builds:
- 'windows'
goarch:
- 'amd64'
- 'arm'
- 'arm64'
ignore:
- goos: darwin
goarch: 'arm'

mod_timestamp: '{{ .CommitTimestamp }}'
env:
- CGO_ENABLED=0
main: ./cmd/aoc-cli
flags:
- -trimpath
ldflags:
- "{{ .Env.GO_BUILD_LDFLAGS }}"
-

universal_binaries:
- # ID of the source build
#
Expand All @@ -68,11 +62,13 @@ archives:
- id: cli
builds:
- cli
format: tar.gz
formats:
- tar.gz
wrap_in_directory: true
format_overrides:
- goos: windows
format: zip
formats:
- zip
name_template: "{{ .Binary }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
files:
- LICENSE
Expand Down Expand Up @@ -111,4 +107,4 @@ changelog:
order: 999

milestones:
- close: true
- close: true
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SHELL := env VERSION=$(VERSION) $(SHELL)
VERSION ?= $(shell git describe --tags $(git rev-list --tags --max-count=1))

GOVERSION:=1.23
GOVERSION:=1.24

APP_NAME?=aoc-cli
SHELL := env APP_NAME=$(APP_NAME) $(SHELL)
Expand Down
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
module github.com/obalunenko/advent-of-code

go 1.23
go 1.24

toolchain go1.24.0

require (
github.com/briandowns/spinner v1.23.2
github.com/manifoldco/promptui v0.9.0
github.com/obalunenko/getenv v1.14.0
github.com/obalunenko/logger v1.2.0
github.com/obalunenko/version v1.2.0
github.com/obalunenko/version v1.3.1
github.com/savioxavier/termlink v1.4.2
github.com/stretchr/testify v1.10.0
github.com/urfave/cli/v2 v2.27.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ github.com/obalunenko/getenv v1.14.0 h1:Q8ClxnNMr5a6N0xNg7nHbdhZI4UUfhZMCjabGruq
github.com/obalunenko/getenv v1.14.0/go.mod h1:PsuPvyLaE71FF7ikdCvPGqILTAWuXq7/+dtlOhab5K4=
github.com/obalunenko/logger v1.2.0 h1:MwsqJWtaxaHFQK7Cjkqk1NnlNPHH+tR1ergdnpST7Kg=
github.com/obalunenko/logger v1.2.0/go.mod h1:XaU3GhUJWda3ow3hhRjlItpIVgQRKa2KDsEeprSzBvg=
github.com/obalunenko/version v1.2.0 h1:eUYme2w38fjzcvToInTGM85xAJycZHo65GvynbH8jCo=
github.com/obalunenko/version v1.2.0/go.mod h1:kXnCfV2LUe+UHRrzjwPC/5lpnPbypwmLZh7BJx7wG1A=
github.com/obalunenko/version v1.3.1 h1:NN+YSOrti8mEyJSnu+7//YSvGrOhLivh60hJXhIrNTI=
github.com/obalunenko/version v1.3.1/go.mod h1:56ydLXefFem3sEJ2iyguuZ7dwJ25VoIRTev/JfxFIa4=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
Expand Down
36 changes: 4 additions & 32 deletions scripts/build/app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,45 +13,17 @@ mkdir -p "${BIN_DIR}"

echo "${SCRIPT_NAME} is running... "

checkInstalled 'goreleaser'

goreleaser healthcheck

APP=${APP_NAME}

echo "Building ${APP}..."

COMMIT="$(git rev-parse HEAD)"
SHORTCOMMIT="$(git rev-parse --short HEAD)"
DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
VERSION="$(git tag | sort -V | tail -1)"
GOVERSION="$(go version | awk '{print $3;}')"

if [ -z "${VERSION}" ] || [ "${VERSION}" = "${SHORTCOMMIT}" ]; then
VERSION="v0.0.0"
fi

if [[ $(git diff --stat) != '' ]]; then
echo 'dirty'

COMMIT="${COMMIT}-dirty"
SHORTCOMMIT="${SHORTCOMMIT}-dirty"
VERSION="${VERSION}-dirty"
fi

BIN_OUT="${BIN_DIR}/${APP}"

BUILDINFO_VARS_PKG=github.com/obalunenko/version
export GO_BUILD_LDFLAGS="-s -w \
-X ${BUILDINFO_VARS_PKG}.version=${VERSION} \
-X ${BUILDINFO_VARS_PKG}.commit=${COMMIT} \
-X ${BUILDINFO_VARS_PKG}.shortcommit=${SHORTCOMMIT} \
-X ${BUILDINFO_VARS_PKG}.builddate=${DATE} \
-X ${BUILDINFO_VARS_PKG}.appname=${APP} \
-X ${BUILDINFO_VARS_PKG}.goversion=${GOVERSION}"

GO_BUILD_PACKAGE="${REPO_ROOT}/cmd/${APP}"

rm -rf "${BIN_OUT}"

goreleaser build --skip=validate --clean --single-target --output "${BIN_OUT}"
go build -trimpath -o "${BIN_OUT}" "${GO_BUILD_PACKAGE}"

echo "Binary compiled at ${BIN_OUT}"
echo "Build ${BIN_OUT} success"
38 changes: 14 additions & 24 deletions vendor/github.com/obalunenko/version/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

79 changes: 54 additions & 25 deletions vendor/github.com/obalunenko/version/version.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading