Skip to content

Commit

Permalink
ci: ensure existence of lib.zip for releases
Browse files Browse the repository at this point in the history
ensure existence of the lib.zip file for downstream releases. This is
done by creating a base zip file containing a README and updating it
with mozilla_repos if mozilla_repos is not empty.
  • Loading branch information
sdowell committed Jan 28, 2022
1 parent a33e987 commit c83db69
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/create-licenses.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,12 @@ done >> ${TMP_LICENSE_FILE}

cat ${TMP_LICENSE_FILE} > ${VENDOR_LICENSE_FILE}

# initialize zip file to ensure existence (downstream builds depend on libs.zip)
README="${KUBE_ROOT}/scripts/docs/create-licenses/README.md"
zip -q "${ZIP_FILENAME}" "${README}"

# Create a package of Mozilla repository source code (only go code).
[ -n "$mozilla_repos" ] && zip -qr $ZIP_FILENAME $mozilla_repos -i '*.go'
[ -n "$mozilla_repos" ] && zip -qur $ZIP_FILENAME $mozilla_repos -i '*.go'

# Cleanup vendor directory
rm -rf vendor
5 changes: 5 additions & 0 deletions scripts/docs/create-licenses/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# create-licenses

This file is intended to be included with the `libs.zip` file that is
distributed with each `kpt` release. The `libs.zip` file contains a packaging of
source files necessary to satisfy the Mozilla license.

0 comments on commit c83db69

Please sign in to comment.