Skip to content

Commit

Permalink
Add release Makefile target
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
  • Loading branch information
ArangoGutierrez committed Feb 15, 2024
1 parent 5e006c7 commit a9fd653
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
.PHONY: build fmt verify
.PHONY: build fmt verify release

GO_CMD ?= go
GO_FMT ?= gofmt
Expand Down Expand Up @@ -40,6 +40,16 @@ verify:
exit 1; \
fi

release:
@rm -rf bin
@mkdir -p bin
@for os in linux darwin; do \
for arch in amd64 arm64; do \
echo "Building $$os-$$arch"; \
GOOS=$$os GOARCH=$$arch $(GO_CMD) build -o bin/$(BINARY_NAME)-$$os-$$arch cmd/main.go; \
done; \
done

.PHONY: generate
generate: controller-gen
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
Expand All @@ -52,4 +62,4 @@ controller-gen: ## Download controller-gen locally if necessary.
# Generate manifests e.g. CRD, RBAC etc.
.PHONY: manifests
manifests: controller-gen
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases

0 comments on commit a9fd653

Please sign in to comment.