github.com/jordan-bonecutter/can-go@v0.0.0-20230901155856-d83995b18e50/Makefile (about)

     1  # Code generated by go.einride.tech/sage. DO NOT EDIT.
     2  # To learn more, see .sage/main.go and https://github.com/einride/sage.
     3  
     4  .DEFAULT_GOAL := default
     5  
     6  cwd := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
     7  sagefile := $(abspath $(cwd)/.sage/bin/sagefile)
     8  
     9  # Setup Go.
    10  go := $(shell command -v go 2>/dev/null)
    11  export GOWORK ?= off
    12  ifndef go
    13  SAGE_GO_VERSION ?= 1.20.2
    14  export GOROOT := $(abspath $(cwd)/.sage/tools/go/$(SAGE_GO_VERSION)/go)
    15  export PATH := $(PATH):$(GOROOT)/bin
    16  go := $(GOROOT)/bin/go
    17  os := $(shell uname | tr '[:upper:]' '[:lower:]')
    18  arch := $(shell uname -m)
    19  ifeq ($(arch),x86_64)
    20  arch := amd64
    21  endif
    22  $(go):
    23  	$(info installing Go $(SAGE_GO_VERSION)...)
    24  	@mkdir -p $(dir $(GOROOT))
    25  	@curl -sSL https://go.dev/dl/go$(SAGE_GO_VERSION).$(os)-$(arch).tar.gz | tar xz -C $(dir $(GOROOT))
    26  	@touch $(GOROOT)/go.mod
    27  	@chmod +x $(go)
    28  endif
    29  
    30  .PHONY: $(sagefile)
    31  $(sagefile): $(go)
    32  	@cd .sage && $(go) mod tidy && $(go) run .
    33  
    34  .PHONY: sage
    35  sage:
    36  	@$(MAKE) $(sagefile)
    37  
    38  .PHONY: update-sage
    39  update-sage: $(go)
    40  	@cd .sage && $(go) get -d go.einride.tech/sage@latest && $(go) mod tidy && $(go) run .
    41  
    42  .PHONY: clean-sage
    43  clean-sage:
    44  	@git clean -fdx .sage/tools .sage/bin .sage/build
    45  
    46  .PHONY: build-integration-tests
    47  build-integration-tests: $(sagefile)
    48  	@$(sagefile) BuildIntegrationTests
    49  
    50  .PHONY: convco-check
    51  convco-check: $(sagefile)
    52  	@$(sagefile) ConvcoCheck
    53  
    54  .PHONY: default
    55  default: $(sagefile)
    56  	@$(sagefile) Default
    57  
    58  .PHONY: format-markdown
    59  format-markdown: $(sagefile)
    60  	@$(sagefile) FormatMarkdown
    61  
    62  .PHONY: format-yaml
    63  format-yaml: $(sagefile)
    64  	@$(sagefile) FormatYaml
    65  
    66  .PHONY: generate-testdata
    67  generate-testdata: $(sagefile)
    68  	@$(sagefile) GenerateTestdata
    69  
    70  .PHONY: git-verify-no-diff
    71  git-verify-no-diff: $(sagefile)
    72  	@$(sagefile) GitVerifyNoDiff
    73  
    74  .PHONY: go-generate
    75  go-generate: $(sagefile)
    76  	@$(sagefile) GoGenerate
    77  
    78  .PHONY: go-licenses
    79  go-licenses: $(sagefile)
    80  	@$(sagefile) GoLicenses
    81  
    82  .PHONY: go-lint
    83  go-lint: $(sagefile)
    84  	@$(sagefile) GoLint
    85  
    86  .PHONY: go-mod-tidy
    87  go-mod-tidy: $(sagefile)
    88  	@$(sagefile) GoModTidy
    89  
    90  .PHONY: go-review
    91  go-review: $(sagefile)
    92  	@$(sagefile) GoReview
    93  
    94  .PHONY: go-test
    95  go-test: $(sagefile)
    96  	@$(sagefile) GoTest
    97  
    98  .PHONY: mockgen
    99  mockgen: $(sagefile)
   100  	@$(sagefile) Mockgen
   101  
   102  .PHONY: stringer
   103  stringer: $(sagefile)
   104  	@$(sagefile) Stringer