Brad King 3a66c7674c Utilities/Release: Update to openssl 1.1.1f %!s(int64=5) %!d(string=hai) anos
..
WiX ed98209ddc Revise include order using clang-format-6.0 %!s(int64=6) %!d(string=hai) anos
linux 3a66c7674c Utilities/Release: Update to openssl 1.1.1f %!s(int64=5) %!d(string=hai) anos
CMakeInstall.bmp 4aac0b6e10 BUG: Put back CMakeInstall.bmp in order to build a package with NSIS on Windows. It was inadvertently removed. %!s(int64=18) %!d(string=hai) anos
CMakeLogo.ico 66f59bd7da cmake-gui: Update icons %!s(int64=7) %!d(string=hai) anos
README.rst 2c95c35c51 Utilities/Release: Add docker spec for STGZ package on Linux %!s(int64=6) %!d(string=hai) anos
consolidate-relnotes.bash c913ab61ae Utilities/Release: Add script to consolidate release notes %!s(int64=8) %!d(string=hai) anos
create-cmake-release.cmake 689fdbfc61 Utilities/Release: Drop linux64 script in favor of docker build %!s(int64=6) %!d(string=hai) anos
osx_release.cmake 2d7cfd30ac Utilities/Release: Drop source archive generation in scripts %!s(int64=6) %!d(string=hai) anos
push.bash 1529f4a930 Utilities/Release: Teach "push" script to create destination subdirectory %!s(int64=6) %!d(string=hai) anos
release_cmake.cmake 954185d414 Utilities/Release: Fetch stage/master/head %!s(int64=8) %!d(string=hai) anos
release_cmake.sh.in 9a34031081 Utilities/Release: Enable signing of Windows release binaries %!s(int64=6) %!d(string=hai) anos
win32_release.cmake 4929453504 Merge topic 'docker-rel-linux' %!s(int64=6) %!d(string=hai) anos
win64_release.cmake 74eef37bc7 Utilities/Release: Select MSVC runtime library via abstraction %!s(int64=6) %!d(string=hai) anos

README.rst

CMake Release Utilities
***********************

This directory contains scripts used to package CMake itself for distribution
on ``cmake.org``. See also the `CMake Source Code Guide`_.

.. _`CMake Source Code Guide`: ../../Help/dev/source.rst

Docker
------

The ``linux//`` directories contain Docker specifications that anyone
may use to produce Linux binaries for CMake:

* ``linux//base/Dockerfile``:
Produces a base image with a build environment for portable CMake binaries.
This image is published in the `kitware/cmake Docker Hub Repository`_
with tag ``build-linux--base-``.

* ``linux//deps/Dockerfile``:
Produces an image with custom-built dependencies for portable CMake binaries.
This image is published in the `kitware/cmake Docker Hub Repository`_
with tag ``build-linux--deps-``.

* ``linux//Dockerfile``:
Produce an image containing a portable CMake binary package for Linux.
Build this image using the CMake source directory as the build context.
The resulting image will have an ``/out`` directory containing the package.
For example:

.. code-block:: console

$ docker build --tag=cmake:build --network none \
-f cmake-src/Utilities/Release/linux/$arch/Dockerfile cmake-src
$ docker container create --name cmake-build cmake:build
$ docker cp cmake-build:/out .
$ ls out/cmake-*-Linux-$arch.*

* ``linux//test/Dockerfile``:
Produces a base image with a test environment for packaged CMake binaries.
For example, build the test base image:

.. code-block:: console

$ docker build --tag=cmake:test-base \
cmake-src/Utilities/Release/linux/$arch/test

Then create a local ``test/Dockerfile`` to prepare an image with both the
CMake source tree and the above-built package::

FROM cmake:test-base
COPY cmake-src /opt/cmake/src/cmake
ADD out/cmake--Linux-.tar.gz /opt/
ENV PATH=/opt/cmake--Linux-/bin:$PATH

Build the test image and run it to drive testing:

.. code-block:: console

$ docker build --tag cmake:test --network none -f test/Dockerfile .
$ docker run --network none cmake:test bash test-make.bash
$ docker run --network none cmake:test bash test-ninja.bash

.. _`kitware/cmake Docker Hub Repository`: https://hub.docker.com/r/kitware/cmake

Scripts for Kitware
-------------------

Kitware uses the following scripts to produce binaries for ``cmake.org``.
They work only on specific machines Kitware uses for such builds.

* ``create-cmake-release.cmake``:
Run ``cmake -DCMAKE_CREATE_VERSION=$ver -P ../create-cmake-release.cmake``
to generate ``create-$ver-*.sh`` release scripts. It also displays
instructions to run them.

* ``*_release.cmake``:
Platform-specific settings used in corresponding scripts generated above.

* ``release_cmake.cmake``:
Code shared by all ``*_release.cmake`` scripts.

* ``release_cmake.sh.in``:
Template for script that runs on the actual build machines.