| ... | ... |
@@ -142,8 +142,18 @@ clean: |
| 142 | 142 |
# Build an official release of OpenShift, including the official images. |
| 143 | 143 |
# |
| 144 | 144 |
# Example: |
| 145 |
-# make clean |
|
| 145 |
+# make release |
|
| 146 | 146 |
release: clean |
| 147 | 147 |
hack/build-release.sh |
| 148 | 148 |
hack/build-images.sh |
| 149 |
+ hack/extract-release.sh |
|
| 149 | 150 |
.PHONY: release |
| 151 |
+ |
|
| 152 |
+# Build only the release binaries for OpenShift |
|
| 153 |
+# |
|
| 154 |
+# Example: |
|
| 155 |
+# make release-binaries |
|
| 156 |
+release-binaries: clean |
|
| 157 |
+ hack/build-release.sh |
|
| 158 |
+ hack/extract-release.sh |
|
| 159 |
+.PHONY: release-binaries |
|
| 150 | 160 |
\ No newline at end of file |
| ... | ... |
@@ -377,6 +377,14 @@ os::build::make_openshift_binary_symlinks() {
|
| 377 | 377 |
os::build::detect_local_release_tars() {
|
| 378 | 378 |
local platform="$1" |
| 379 | 379 |
|
| 380 |
+ if [[ ! -d "${OS_LOCAL_RELEASEPATH}" ]]; then
|
|
| 381 |
+ echo "There are no release artifacts in ${OS_LOCAL_RELEASEPATH}"
|
|
| 382 |
+ exit 2 |
|
| 383 |
+ fi |
|
| 384 |
+ if [[ ! -d "${OS_LOCAL_RELEASEPATH}/.commit" ]]; then
|
|
| 385 |
+ echo "There is no release .commit identifier ${OS_LOCAL_RELEASEPATH}"
|
|
| 386 |
+ exit 2 |
|
| 387 |
+ fi |
|
| 380 | 388 |
local primary=$(find ${OS_LOCAL_RELEASEPATH} -maxdepth 1 -type f -name openshift-origin-*-${platform}-* | grep -v image)
|
| 381 | 389 |
if [[ $(echo "${primary}" | wc -l) -ne 1 ]]; then
|
| 382 | 390 |
echo "There should be exactly one ${platform} primary tar in $OS_LOCAL_RELEASEPATH"
|
| 383 | 391 |
new file mode 100755 |
| ... | ... |
@@ -0,0 +1,24 @@ |
| 0 |
+#!/bin/bash |
|
| 1 |
+ |
|
| 2 |
+# This script extracts a valid release tar into _output/releases. It requires hack/build-release.sh |
|
| 3 |
+# to have been executed |
|
| 4 |
+ |
|
| 5 |
+set -o errexit |
|
| 6 |
+set -o nounset |
|
| 7 |
+set -o pipefail |
|
| 8 |
+ |
|
| 9 |
+OS_ROOT=$(dirname "${BASH_SOURCE}")/..
|
|
| 10 |
+source "${OS_ROOT}/hack/common.sh"
|
|
| 11 |
+ |
|
| 12 |
+# Go to the top of the tree. |
|
| 13 |
+cd "${OS_ROOT}"
|
|
| 14 |
+ |
|
| 15 |
+# Copy the linux release archives release back to the local _output/local/go/bin directory. |
|
| 16 |
+# TODO: support different OS's? |
|
| 17 |
+os::build::detect_local_release_tars "linux" |
|
| 18 |
+ |
|
| 19 |
+mkdir -p "${OS_LOCAL_BINPATH}"
|
|
| 20 |
+tar mxzf "${OS_PRIMARY_RELEASE_TAR}" -C "${OS_LOCAL_BINPATH}"
|
|
| 21 |
+tar mxzf "${OS_IMAGE_RELEASE_TAR}" -C "${OS_LOCAL_BINPATH}"
|
|
| 22 |
+ |
|
| 23 |
+os::build::make_openshift_binary_symlinks |
|
| 0 | 24 |
\ No newline at end of file |