Skip to content

Commit cb303e4

Browse files
authored
Add licence.html to release quilkin.zip (#905)
Include the licence.html with the released zip file so we declare all dependency licences with our release artifacts in accordance with a few OSS licences. Closes: #858
1 parent dddc9b2 commit cb303e4

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

build/Makefile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ build: binary-archive build-image
132132
build-all-binaries: ensure-build-image build-linux-binary build-macos-binary build-windows-binary
133133

134134
# Build an archive all binaries
135-
binary-archive: ensure-build-image build-all-binaries
135+
binary-archive: ensure-build-image build-licence-report build-all-binaries
136136
docker run --rm $(common_rust_args) -w $(CARGO_TARGET_DIR) \
137-
--entrypoint=bash $(BUILD_IMAGE_TAG) -c 'zip ../../quilkin-$(package_version).zip ./*/release/quilkin ./*/release/quilkin.exe'
137+
--entrypoint=bash $(BUILD_IMAGE_TAG) -c 'cp ../../license.html . && zip ../../quilkin-$(package_version).zip ./*/release/quilkin ./*/release/quilkin.exe ./license.html'
138138

139139
# Build binary for x86_64-unknown-linux-gnu.
140140
# Use BUILD_LOCAL=1 to build through local cargo rather than through the build container.
@@ -177,20 +177,24 @@ endif
177177
# Use either `REPOSITORY` to specify a container repository (defaults to blank/none), or use `IMAGE_TAG` argument to specify
178178
# the entire image name and tag. Defaults to `quilkin:${version}-${git-sha}`.
179179
# Use BUILD_LOCAL=1 to build the binary through local cargo rather than through the build container.
180-
build-image: ensure-build-image build-linux-binary
180+
build-image: ensure-build-image build-licence-report build-linux-binary
181181
build-image:
182182
-mkdir -p "$(project_path)/target/image/"
183183
ifdef BUILD_LOCAL
184184
cp "$(project_path)/target/x86_64-unknown-linux-gnu/release/quilkin" "$(project_path)/target/image/"
185185
else
186186
cp "$(project_path)/target/build-image/x86_64-unknown-linux-gnu/release/quilkin" "$(project_path)/target/image/"
187187
endif
188-
docker run --rm $(common_rust_args) \
189-
--entrypoint=bash $(BUILD_IMAGE_TAG) -c 'cargo about generate license.html.hbs > license.html'
190188
docker run --rm $(common_rust_args) \
191189
--entrypoint=bash $(BUILD_IMAGE_TAG) -c './image/archive_dependencies.sh'
192190
docker build --platform=linux/amd64 -t $(IMAGE_TAG) -f $(project_path)/image/Dockerfile $(project_path)
193191

192+
# Generates the HTML report of all open source licence dependencies
193+
build-licence-report: ensure-build-image
194+
build-licence-report:
195+
docker run --rm $(common_rust_args) \
196+
--entrypoint=bash $(BUILD_IMAGE_TAG) -c 'cargo about generate license.html.hbs > license.html'
197+
194198
# Builds Quilkin, pushes it to a repository (use REPOSITORY arg to set value)
195199
# and then runs the Agones integration tests. See targets `build-images` and `push` for more options and details.
196200
# Not part of `test` as it requires a Kubernetes cluster to be provisioned and running.

0 commit comments

Comments
 (0)