Thanks to visit codestin.com
Credit goes to github.com

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
5 changes: 0 additions & 5 deletions .github/dependencies.txt

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/merge_to_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x
go-version: 1.24.x
- name: "Install dependencies"
run: make dependencies
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x
go-version: 1.24.x
- name: "Install dependencies"
run: make dependencies
run: make mod-download
shell: bash
- name: "Run go mod tidy"
run: make tidy
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
strategy:
matrix:
tinygo-version: [0.31.2]
go-version: [1.23.x]
go-version: [1.24.x]
node-version: [18]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tag_to_draft_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: "Install Go"
uses: actions/setup-go@v5
with:
go-version: '1.23.x'
go-version: '1.24.x'
- name: "Install Rust"
uses: dtolnay/rust-toolchain@stable
- name: "Generate static app config"
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
### Dependencies:
- build(deps): `github.com/fastly/go-fastly/v10` from 10.0.0 to 10.0.1 ([#1467](https://github.com/fastly/cli/pull/1467))
- build(deps): `golang.org/x/net` from 0.37.0 to 0.39.0 ([#1467](https://github.com/fastly/cli/pull/1467))
- build(go.mod): upgrade to go 1.24.0 in order to take advantage of the new tooling mechanism ([#1469](https://github.com/fastly/cli/pull/1469))

## [v11.2.0](https://github.com/fastly/cli/releases/tag/v11.2.0) (2025-04-10)

Expand Down
45 changes: 23 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ SHELL := /usr/bin/env bash -o pipefail ## Set the shell to use for finding Go fi
build: config ## Compile program (CGO disabled)
CGO_ENABLED=0 $(GO_BIN) build $(GO_ARGS) ./cmd/fastly

GO_BIN ?= go ## Allows overriding go executable.
TEST_COMMAND ?= $(GO_BIN) test ## Enables support for tools such as https://github.com/rakyll/gotest
TEST_ARGS ?= -v -timeout 15m ./... ## The compute tests can sometimes exceed the default 10m limit
## Allows overriding go executable.
GO_BIN ?= go
## Enables support for tools such as https://github.com/rakyll/gotest
TEST_COMMAND ?= $(GO_BIN) test
## The compute tests can sometimes exceed the default 10m limit
TEST_ARGS ?= -v -timeout 15m ./...

ifeq ($(OS), Windows_NT)
SHELL = cmd.exe
Expand Down Expand Up @@ -50,19 +53,13 @@ config:
@$(CONFIG_SCRIPT)

.PHONY: all
all: config dependencies tidy fmt vet staticcheck gosec semgrep imports test build install ## Run EVERYTHING!

# Update CI tools used by ./.github/workflows/pr_test.yml
.PHONY: dependencies
dependencies:
@while read -r line || [ -n "$$line" ]; do \
$(GO_BIN) install $$line; \
done < .github/dependencies.txt
@if [ "$$(uname)" = 'Darwin' ]; then \
if ! command -v semgrep &> /dev/null; then \
brew install semgrep; \
fi \
fi
all: config mod-download tidy fmt vet staticcheck gosec semgrep imports test build install ## Run EVERYTHING!

## Downloads the Go modules
mod-download:
@echo "==> Downloading Go module"
@$(GO_BIN) mod download
.PHONY: mod-download

# Clean up Go modules file.
.PHONY: tidy
Expand All @@ -83,12 +80,12 @@ vet: config ## Run vet static analysis
# Run linter.
.PHONY: revive
revive: ## Run linter (using revive)
revive ./...
$(GO_BIN) tool revive ./...

# Run security vulnerability checker.
.PHONY: gosec
gosec: ## Run security vulnerability checker
gosec -quiet -exclude=G104 ./{cmd,pkg}/...
$(GO_BIN) tool gosec -quiet -exclude=G104 ./{cmd,pkg}/...

nilaway: ## Run nilaway
@nilaway ./...
Expand All @@ -97,6 +94,11 @@ nilaway: ## Run nilaway
# NOTE: We can only exclude the import-text-template rule via a semgrep CLI flag
.PHONY: semgrep
semgrep: ## Run semgrep
@if [ "$$(uname)" = 'Darwin' ]; then \
if ! command -v semgrep &> /dev/null; then \
brew install semgrep; \
fi \
fi
@if [ '$(SEMGREP_SKIP)' != 'true' ]; then \
if command -v semgrep &> /dev/null; then semgrep ci --config auto --exclude-rule go.lang.security.audit.xss.import-text-template.import-text-template $(SEMGREP_ARGS); fi \
fi
Expand All @@ -105,12 +107,12 @@ semgrep: ## Run semgrep
# To ignore lines use: //lint:ignore <CODE> <REASON>
.PHONY: staticcheck
staticcheck: ## Run static analysis
staticcheck ./{cmd,pkg}/...
@$(GO_BIN) tool staticcheck ./{cmd,pkg}/...

# Run imports formatter.
.PHONY: imports
imports:
@echo goimports ./{cmd,pkg}
@echo $(GO_BIN) tool goimports ./{cmd,pkg}
@eval "bash -c 'F=\$$(goimports -l ./{cmd,pkg}) ; if [[ \$$F ]] ; then echo \$$F ; exit 1 ; fi'"

.PHONY: golangci
Expand Down Expand Up @@ -144,8 +146,7 @@ scaffold-category:
# e.g. make graph PKG_IMPORT_PATH=github.com/fastly/cli/pkg/commands/kvstoreentry
.PHONY: graph
graph: ## Graph generates a call graph that focuses on the specified package
@$(GO_BIN) install github.com/ofabry/go-callvis@latest 2>/dev/null
go-callvis -file "callvis" -focus "$(PKG_IMPORT_PATH)" ./cmd/fastly/
$(GO_BIN) tool go-callvis -file "callvis" -focus "$(PKG_IMPORT_PATH)" ./cmd/fastly/
@rm callvis.gv

.PHONY: deps-app-update
Expand Down
Loading
Loading