Skip to content

Commit

Permalink
add models-gen to makefile (#1673)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiuker authored Jul 5, 2023
1 parent ba62beb commit 264deda
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,47 @@ test-operator-integration:

test-operator:
@(env bash $(PWD)/web-app/tests/scripts/operator.sh)

models-gen-mac:
@swagger generate client -f ./swagger.yml -m ./models
@ls ./models | xargs -I {} gsed -i "2 a\
// This file is part of MinIO Operator\n\
// Copyright (c) 2023 MinIO, Inc.\n\
//\n\
// This program is free software: you can redistribute it and/or modify\n\
// it under the terms of the GNU Affero General Public License as published by\n\
// the Free Software Foundation, either version 3 of the License, or\n\
// (at your option) any later version.\n\
//\n\
// This program is distributed in the hope that it will be useful,\n\
// but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
// GNU Affero General Public License for more details.\n\
//\n\
// You should have received a copy of the GNU Affero General Public License\n\
// along with this program. If not, see <http://www.gnu.org/licenses/>.\n\
//\n\
" ./models/{}
@rm -rf client

models-gen:
@swagger generate client -f ./swagger.yml -m ./models
@ls ./models | xargs -I {} sed -i "2 a\
// This file is part of MinIO Operator\n\
// Copyright (c) 2023 MinIO, Inc.\n\
//\n\
// This program is free software: you can redistribute it and/or modify\n\
// it under the terms of the GNU Affero General Public License as published by\n\
// the Free Software Foundation, either version 3 of the License, or\n\
// (at your option) any later version.\n\
//\n\
// This program is distributed in the hope that it will be useful,\n\
// but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
// GNU Affero General Public License for more details.\n\
//\n\
// You should have received a copy of the GNU Affero General Public License\n\
// along with this program. If not, see <http://www.gnu.org/licenses/>.\n\
//\n\
" ./models/{}
@rm -rf client

0 comments on commit 264deda

Please sign in to comment.