github.com/freiheit-com/kuberpult@v1.24.2-0.20240328135542-315d5630abe6/pkg/Makefile (about)

     1  # This file is part of kuberpult.
     2  
     3  # Kuberpult is free software: you can redistribute it and/or modify
     4  # it under the terms of the Expat(MIT) License as published by
     5  # the Free Software Foundation.
     6  
     7  # Kuberpult is distributed in the hope that it will be useful,
     8  # but WITHOUT ANY WARRANTY; without even the implied warranty of
     9  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    10  # MIT License for more details.
    11  
    12  # You should have received a copy of the MIT License
    13  # along with kuberpult. If not, see <https://directory.fsf.org/wiki/License:Expat>.
    14  
    15  # Copyright 2023 freiheit.com
    16  
    17  # NOTE: this will be replaced with the etf-golang makefile
    18  include ../Makefile.variables
    19  MAKEFLAGS += --no-builtin-rules
    20  
    21  export CGO_ENABLED=1
    22  
    23  GO := go
    24  
    25  GO_FILES := $(shell find . -type f -name '*.go')
    26  
    27  all:
    28  	earthly +build-all
    29  lint:
    30  	earthly +lint
    31  test:
    32  	earthly +test "--GO_TEST_ARGS=$(GO_TEST_ARGS)"
    33  
    34  api/v1/api.EnvironmentConfig_grpc.pb.go api/v1/api.pb.go api/v1/api.pb.gw.go api/v1/api_grpc.pb.go: api/v1/api.proto buf.yaml buf.gen.yaml buf.lock
    35  	if grep -q '^import "google/api/annotations.proto"' $< || grep -q '^import "google/api/http.proto"' $< ; then echo 'Instead of using google.api.http protobuf annotations we write HTTP handlers by hand' ; exit 1 ; fi
    36  	buf generate
    37  
    38  release: #no-op
    39  clean:
    40  	rm -f api/v1/*.go
    41  proto: api/v1/api_grpc.pb.go
    42  
    43  build-pr: all
    44  build-main: all
    45  
    46  .PHONY: all clean release test