This project has two roles:
- configure, build, archive and automatically upload Release and Debug OpenSSL install trees as release assets
- organize OpenSSL source archives in a dedicated release
For any given Visual Studio generator, three archives are generated and uploaded to the corresponding GitHub release:
OpenSSL_<OPENSSL_VERSION>-install-msvc<MSVC_VERSION>-<bitness>-Debug.tar.gz
OpenSSL_<OPENSSL_VERSION>-install-msvc<MSVC_VERSION>-<bitness>-Release.tar.gz
OpenSSL_<OPENSSL_VERSION>-install-msvc<MSVC_VERSION>-<bitness>.tar.gz
where
<OPENSSL_VERSION>
is of the form<major>_<minor>_<patch><letter>
<MSVC_VERSION>
is a four digit number identifying visual studio<bitness>
is either32
or64
For example:
OpenSSL_1_0_2n-install-msvc1900-64-Debug.tar.gz
OpenSSL_1_0_2n-install-msvc1900-64-Release.tar.gz
OpenSSL_1_0_2n-install-msvc1900-64.tar.gz
- install Visual Studio, CMake, StawberryPerl and github-release.
- Download official OpenSSL archive from https://www.openssl.org/source/
- Upload archive in the source release
- Update release description
- Attempt to configure and build OpenSSL disabling upload (see instructions below)
- Two possible scenarios:
- If it succeeds, publish a new tag associated with the current master branch
- If it fails, update the CMakeLists.txt and try again
Archives for OpenSSL version associated with the CMake variable OPENSSL_VERSION
are built. Inspect the
CMakeLists.txt to find out which version is built by default.
- Git clone this repository (or download
CMakeLists.txt
) into a folder such asC:\path\Slicer-OpenSSL
- Create a build folder such as
C:\path\Slicer-OpenSSL-build
- Open Visual Studio terminal for the desired version and architecture
- Configure specifying matching Visual Studio generator and architecture as well as
PERL_COMMAND
,GITHUB_RELEASE_EXECUTABLE
andGITHUB_TOKEN
options:set PERL_COMMAND=C:\StrawberryPerl-x64\perl\bin\perl.exe set GITHUB_RELEASE_EXECUTABLE=D:\Support\github-release-venv\Scripts\githubrelease.exe set GITHUB_TOKEN=xyz cd C:\path\Slicer-OpenSSL-build cmake.exe ^ -DPERL_COMMAND=%PERL_COMMAND% ^ -DGITHUB_RELEASE_EXECUTABLE=%GITHUB_RELEASE_EXECUTABLE% ^ -DGITHUB_TOKEN=%GITHUB_TOKEN% ^ -G "Visual Studio 16 2019" ^ -A x64 ^ -DUPLOAD_PACKAGES=ON ^ ../Slicer-OpenSSL
- Build
Since
UPLOAD_PACKAGES
isON
, install tree archives are automatically uploaded as assets associated with the release named after the selectedOPENSSL_VERSION
.cmake.exe --build .
- Once archives are uploaded, update the release description (see below)
The following snippet was designed for updating the description of releases organizing install tree archives and it should be executed in bash.
It also expects githubrelease
command line tool to be in the PATH
.
version=1.1.1g
cd /tmp
#
# download assets
#
githubrelease asset Slicer/Slicer-OpenSSL download ${version}
#
# compute SHA256 and generate release description
#
description_file=/tmp/Slicer-OpenSSL-${version}-release-description.txt
download_url_base=https://github.com/Slicer/Slicer-OpenSSL/releases/download/${version}
IFS=$'\n'
for line in $(sha256sum OpenSSL_${version//./_}*); do
sha256=$(echo ${line} | cut -f1 -d" ");
file=$(echo ${line} | cut -f3 -d" ");
md5sum=$(md5sum ${file} | cut -f1 -d" ")
file=${file##*/}
echo -e "* [${file}]($download_url_base/${file})\n * SHA256: \`${sha256}\`\n * MD5: \`${md5sum}\`";
done > ${description_file}
cat ${description_file}
#
# Update release description
#
githubrelease release Slicer/Slicer-OpenSSL edit ${version} --body "$(cat ${description_file})"
This project is covered by the OSI-approved BSD 3-clause License.
OpenSSL is distributed under the OpenSSL License. For more information about OpenSSL, visit https://www.openssl.org/