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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

# Ref: https://github.com/golangci/golangci-lint-action
- name: Lint
uses: golangci/golangci-lint-action@v7
uses: golangci/golangci-lint-action@v8
with:
args: --timeout=30m --config=.golangci.yaml --issues-exit-code=0

Expand Down
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ Date format: `YYYY-MM-DD`
### Fixed
### Security

---
## [0.4.1] - 2025-07-01

### Added
### Changed
- **debt**: Upgraded all dependencies to the latest supported versions.

### Deprecated
### Removed
### Fixed
### Security

---
## [0.4.0] - 2025-04-16

Expand Down Expand Up @@ -79,7 +91,8 @@ Date format: `YYYY-MM-DD`
### Fixed
### Security

[Unreleased]: https://github.com/sixafter/graph/compare/v0.4.0...HEAD
[Unreleased]: https://github.com/sixafter/graph/compare/v0.4.1...HEAD
[0.4.1]: https://github.com/sixafter/graph/compare/v0.4.0...v0.4.1
[0.4.0]: https://github.com/sixafter/graph/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/sixafter/graph/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/sixafter/graph/compare/v0.1.0...v0.2.0
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ vuln: ## Check for vulnerabilities

.PHONY: help
help: ## Display this help screen
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | sort

# %: - rule which match any task name; @: - empty recipe = do nothing
%:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.24

require (
github.com/stretchr/testify v1.10.0
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM=
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8=
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b h1:M2rDM6z3Fhozi9O7NWsxAkg/yqS/lQJ6PmkyIV3YP+o=
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
80 changes: 80 additions & 0 deletions scripts/os-type.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# This source code is licensed under the Apache 2.0 License found in the
# LICENSE file in the root directory of this source tree.

# Detect the platform (similar to $OSTYPE)
# OS=${OSTYPE//[0-9.]/}

UNAME=$( command -v uname)

function detect_os() {
Expand Down Expand Up @@ -37,6 +40,54 @@ function is_linux() {
return $(false)
}

function is_linux_arm() {
if ! $(is_linux); then
return $(false)
fi

local ARCH
ARCH=$(uname -m)

case "$ARCH" in
arm*|aarch64)
return $(true)
;;
*)
return $(false)
;;
esac
}

function is_linux_amd() {
if ! $(is_linux); then
return $(false)
fi

local ARCH
ARCH=$(uname -m)

if [[ "$ARCH" == "x86_64" ]]; then
return $(true)
fi

return $(false)
}

function is_linux_x86() {
if ! $(is_linux); then
return $(false)
fi

local ARCH
ARCH=$(uname -m)

if [[ "$ARCH" == "i386" || "$ARCH" == "i686" ]]; then
return $(true)
fi

return $(false)
}

function is_macos() {
local OS=$(detect_os)
if [[ $OS == 'macOS' ]]; then
Expand Down Expand Up @@ -72,3 +123,32 @@ function is_macos_amd() {

return $(false)
}

function is_linux_ubuntu() {
if ! $(is_linux); then
return $(false)
fi

if [[ -f /etc/os-release ]]; then
. /etc/os-release
if [[ $ID == 'ubuntu' ]]; then
return $(true)
fi
fi

return $(false)
}

function is_wsl() {
if ! $(is_linux); then
return $(false)
fi

# WSL detection based on /proc/version or osrelease
if grep -qiE 'microsoft|wsl' /proc/version 2>/dev/null || \
grep -qiE 'microsoft|wsl' /proc/sys/kernel/osrelease 2>/dev/null; then
return $(true)
fi

return $(false)
}
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ github.com/pmezard/go-difflib/difflib
## explicit; go 1.17
github.com/stretchr/testify/assert
github.com/stretchr/testify/assert/yaml
# golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0
# golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b
## explicit; go 1.23.0
golang.org/x/exp/constraints
# gopkg.in/yaml.v3 v3.0.1
Expand Down