Adding messaging and script updates to ensure smoother golang updates (#3049)

- Updated rpm spec and rpm-prepare script to template golang version
 - Docs now contain a warning about golang version update

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
This commit is contained in:
Mohammed Ahmed
2020-05-01 02:20:08 +05:30
committed by GitHub
parent 2bfbb0922d
commit 75b2973eb1
3 changed files with 17 additions and 2 deletions

View File

@@ -7,7 +7,12 @@ toc::[]
== Setting up
Requires *Go 1.13*
Requires *Go 1.12*
**WARNING**: If you are adding any features that require a higher version of golang, such as golang 1.13
for example, please contact maintainers to check of the releasing systems can handle the newer versions.
If that is ok, please ensure you update the required golang version, both here and in the file link:/scripts/rpm-prepare.sh[`scripts/rpm-prepare.sh`]
. link:https://help.github.com/en/articles/fork-a-repo[Fork] the link:https://github.com/openshift/odo[`odo`] repository.

View File

@@ -3,7 +3,8 @@
%global debug_package %{nil}
%global package_name openshift-odo
%global product_name odo
%global golang_version 1.12
%global golang_version ${GOLANG_VERSION}
%global golang_version_nodot ${GOLANG_VERSION_NODOT}
%global odo_version ${ODO_RPM_VERSION}
%global odo_release ${ODO_RELEASE}
%global git_commit ${GIT_COMMIT}

View File

@@ -11,12 +11,19 @@ export ODO_RELEASE=${ODO_RELEASE:=1}
export GIT_COMMIT=${GIT_COMMIT:=`git rev-parse --short HEAD 2>/dev/null`}
export ODO_RPM_VERSION=${ODO_VERSION//-}
# Golang version variables, if you are bumping this, please contact redhat maintainers to ensure that internal
# build systems can handle these versions
export GOLANG_VERSION=${GOLANG_VERSION:-1.12}
export GOLANG_VERSION_NODOT=${GOLANG_VERSION_NODOT:-112}
# Print env for verifcation
echo "Printing envs for verification"
echo "ODO_VERSION=$ODO_VERSION"
echo "ODO_RELEASE=$ODO_RELEASE"
echo "GIT_COMMIT=$GIT_COMMIT"
echo "ODO_RPM_VERSION=$ODO_RPM_VERSION"
echo "GOLANG_VERSION=$GOLANG_VERSION"
echo "GOLANG_VERSION_NODO=$GOLANG_VERSION_NODOT"
OUT_DIR=".rpmbuild"
DIST_DIR="$(pwd)/dist"
@@ -73,6 +80,8 @@ echo "ODO_VERSION=$ODO_VERSION" > $OUT_DIR/version
echo "ODO_RELEASE=$ODO_RELEASE" >> $OUT_DIR/version
echo "GIT_COMMIT=$GIT_COMMIT" >> $OUT_DIR/version
echo "ODO_RPM_VERSION=$ODO_RPM_VERSION" >> $OUT_DIR/version
echo "GOLANG_VERSION=$GOLANG_VERSION" >> $OUT_DIR/version
echo "GOLANG_VERSION_NODOT=$GOLANG_VERSION_NODOT" >> $OUT_DIR/version
# After success copy stuff to actual location