github.com/sacloud/iaas-api-go@v1.12.0/includes/README.md (about)

     1  # makefile
     2  
     3  sacloudプロダクトで共通利用するMakefile
     4  
     5  - `go/`: Go言語向け
     6  
     7  ## Usage
     8  
     9  利用するプロジェクト側で以下のように利用します。
    10  
    11  #### リモートリポジトリの追加(初回のみ)
    12  
    13  ```bash
    14  git remote add makefile https://github.com/sacloud/makefile.git
    15  ```
    16  
    17  #### 追加(初回のみ)
    18  
    19  ```bash
    20  git subtree add --prefix=includes --squash makefile v0.0.8
    21  ```
    22  
    23  利用する側のプロジェクトではMakefileを以下のように記述します。
    24  
    25  ```makefile
    26  # 必要に応じて変数定義
    27  AUTHOR         ?= The sacloud/example Authors
    28  COPYRIGHT_YEAR ?= 2022
    29  BIN            ?= example
    30  DEFAULT_GOALS  ?= fmt set-license go-licenses-check goimports lint test build
    31  
    32  # 必要なファイルをインクルード
    33  include includes/go/common.mk
    34  include includes/go/simple.mk
    35  
    36  # ゴールを追加
    37  default: $(DEFAULT_GOALS)
    38  tools: dev-tools # toolsゴールはsacloudプロダクト向け日次CIを行うプロジェクトでは必須
    39  ```
    40  
    41  #### 更新
    42  
    43  ```bash
    44  git subtree pull --prefix=includes --squash makefile v0.0.8
    45  ```
    46  
    47  ## License
    48  
    49  `sacloud/makefile` Copyright (C) 2022-2023 The sacloud/makefile Authors.
    50  
    51  This project is published under [Apache 2.0 License](LICENSE).
    52