Skip to content

Commit

Permalink
Fixes 22903
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanlm committed Jan 21, 2019
1 parent 84b2e38 commit 4455089
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 19 deletions.
2 changes: 2 additions & 0 deletions bootstrap/scripts/3-prepare.sh
Expand Up @@ -9,5 +9,7 @@ SCRIPTS="$(cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P)"

. ${SCRIPTS}/envvars.sh

set_version_variables

./pharo Pharo.image ${IMAGE_FLAGS} ${BOOTSTRAP_REPOSITORY}/bootstrap/scripts/prepare_image.st --save --quit
./pharo Pharo.image ${IMAGE_FLAGS} ${BOOTSTRAP_REPOSITORY}/bootstrap/scripts/bootstrap.st --ARCH=${BOOTSTRAP_ARCH} --BUILD_NUMBER=${BUILD_NUMBER} --VERSION_INFO=`GIT_DIR=${BOOTSTRAP_REPOSITORY}/.git git describe --long --tags --abbrev=40` --quit
2 changes: 1 addition & 1 deletion bootstrap/scripts/4-build.sh
Expand Up @@ -227,5 +227,5 @@ echo "70" > pharo.version
# clean bak sources files
rm -f *.bak

PHARO_SOURCES_PREFIX=$(echo "${PHARO_NAME_PREFIX}" | cut -d'-' -f 1)
PHARO_SOURCES_PREFIX=$(echo "${PHARO_NAME_PREFIX}" | cut -d'-' -f 1 | cut -d'.' -f 1-2)
zip "${PHARO_IMAGE_NAME}.zip" ${PHARO_IMAGE_NAME}.* ${PHARO_SOURCES_PREFIX}*.sources pharo.version
12 changes: 8 additions & 4 deletions bootstrap/scripts/envversion.sh
Expand Up @@ -9,7 +9,8 @@
function is_release_build() {
set -f
local versionTag=$(git tag --list --points-at HEAD | grep -E "^v[0-9]+\.[0-9]+.[0-9]+(\-[a-zA-Z0-9_]+)?$")
if [ "${versionTag}" == "" ]; then
set +f
if [ "${versionTag}" == "" ]; then
echo 0
else
echo 1
Expand All @@ -26,6 +27,7 @@ function ensure_branch_name() {
if [ "${BRANCH_NAME}" == "" ]; then
set -f
BRANCH_NAME="$(git branch | grep \* | cut -d' ' -f 2)"
set +f
fi
}

Expand Down Expand Up @@ -91,6 +93,8 @@ function set_version_variables() {
set_version_pull_request_variables
fi

# this is just to make things clear (and because they could change in the future, who knows :P)
PHARO_VM_VERSION="${PHARO_SHORT_VERSION}"
}
# I will use 70 vm for now (we still do not have 80 vm)
#PHARO_VM_VERSION="${PHARO_SHORT_VERSION}"
PHARO_VM_VERSION="70"
PHARO_COMMIT_HASH="$(git rev-parse --verify HEAD)"
}
8 changes: 8 additions & 0 deletions bootstrap/scripts/prepare_for_upload.sh
Expand Up @@ -5,6 +5,8 @@ set -o pipefail
set -o nounset
set -o xtrace

. ${SCRIPTS}/envversion.sh

#Get the hash of the built image

PHARO_NAME_PREFIX=$(find . -name "Pharo*.zip" | head -n 1 | cut -d'/' -f 2 | cut -d'-' -f 1-2)
Expand All @@ -23,6 +25,12 @@ cp "${MINIMAL_IMAGE_NAME32}" latest-minimal.zip
cp "${MINIMAL_IMAGE_NAME32}" latest-minimal-32.zip
cp "${MINIMAL_IMAGE_NAME64}" latest-minimal-64.zip

if [ $(is_release_build) == 1 ]; then
cp "${FULL_IMAGE_NAME32}" stable-32.zip
cp "${FULL_IMAGE_NAME64}" stable-64.zip
fi


for f in ${PHARO_NAME_PREFIX}*-32bit-*.zip; do
#If it is not base image
BITNESS=32bit
Expand Down
15 changes: 8 additions & 7 deletions bootstrap/scripts/runKernelTests.sh
Expand Up @@ -18,19 +18,20 @@ find ${CACHE}
# WARNING: I'm assuming CACHE=bootstrap-cache
# WARNING: If you change this, you will need to change "runTests.sh" too
#
PHARO_NAME_PREFIX=$(find ${CACHE} -name "Pharo*.zip" | head -n 1 | cut -d'/' -f 2 | cut -d'-' -f 1-2)
PHARO_VM_VERSION=$(echo "${PHARO_NAME_PREFIX}" | cut -d'-' -f 1| cut -c 6- | cut -d'.' -f 1-2 | sed 's/\.//')
TEST_NAME_PREFIX=$(find ${CACHE} -name "Pharo*.zip" | head -n 1 | cut -d'/' -f 2 | cut -d'-' -f 1-2)
#TEST_VM_VERSION=$(echo "${TEST_NAME_PREFIX}" | cut -d'-' -f 1| cut -c 6- | cut -d'.' -f 1-2 | sed 's/\.//')
TEST_VM_VERSION="70"

${BOOTSTRAP_REPOSITORY:-.}/bootstrap/scripts/getPharoVM.sh ${PHARO_VM_VERSION} vm ${1}
${BOOTSTRAP_REPOSITORY:-.}/bootstrap/scripts/getPharoVM.sh ${TEST_VM_VERSION} vm ${1}

IMAGE_ARCHIVE=$(find ${CACHE} -name ${PHARO_NAME_PREFIX}-bootstrap-${1}bit-*.zip)
IMAGE_ARCHIVE=$(find ${CACHE} -name ${TEST_NAME_PREFIX}-bootstrap-${1}bit-*.zip)
unzip $IMAGE_ARCHIVE
IMAGE_FILE=$(find . -name ${PHARO_NAME_PREFIX}-bootstrap-${1}bit-*.image)
IMAGE_FILE=$(find . -name ${TEST_NAME_PREFIX}-bootstrap-${1}bit-*.image)

HERMES_ARCHIVE=$(find ${CACHE} -name ${PHARO_NAME_PREFIX}-hermesPackages-${1}bit-*.zip)
HERMES_ARCHIVE=$(find ${CACHE} -name ${TEST_NAME_PREFIX}-hermesPackages-${1}bit-*.zip)
unzip $HERMES_ARCHIVE

RPACKAGE_ARCHIVE=$(find ${CACHE} -name ${PHARO_NAME_PREFIX}-rpackage-${1}bit-*.zip)
RPACKAGE_ARCHIVE=$(find ${CACHE} -name ${TEST_NAME_PREFIX}-rpackage-${1}bit-*.zip)
unzip $RPACKAGE_ARCHIVE

mv $IMAGE_FILE bootstrap.image
Expand Down
9 changes: 5 additions & 4 deletions bootstrap/scripts/runTests.sh
Expand Up @@ -18,12 +18,13 @@ find ${CACHE}
# WARNING: I'm assuming CACHE=bootstrap-cache
# WARNING: If you change this, you will need to change "runKernelTests.sh" too
#
PHARO_NAME_PREFIX=$(find ${CACHE} -name "Pharo*.zip" | head -n 1 | cut -d'/' -f 2 | cut -d'-' -f 1-2)
PHARO_VM_VERSION=$(echo "${PHARO_NAME_PREFIX}" | cut -d'-' -f 1| cut -c 6- | cut -d'.' -f 1-2 | sed 's/\.//')
TEST_NAME_PREFIX=$(find ${CACHE} -name "Pharo*.zip" | head -n 1 | cut -d'/' -f 2 | cut -d'-' -f 1-2)
#TEST_VM_VERSION=$(echo "${TEST_NAME_PREFIX}" | cut -d'-' -f 1| cut -c 6- | cut -d'.' -f 1-2 | sed 's/\.//')
TEST_VM_VERSION="70"

${BOOTSTRAP_REPOSITORY:-.}/bootstrap/scripts/getPharoVM.sh ${PHARO_VM_VERSION} vm ${1}
${BOOTSTRAP_REPOSITORY:-.}/bootstrap/scripts/getPharoVM.sh ${TEST_VM_VERSION} vm ${1}

IMAGE_ARCHIVE=$(find ${CACHE} -name ${PHARO_NAME_PREFIX}-${1}bit-*.zip)
IMAGE_ARCHIVE=$(find ${CACHE} -name ${TEST_NAME_PREFIX}-${1}bit-*.zip)
unzip $IMAGE_ARCHIVE
IMAGE_FILE=$(find . -name Pharo*-${1}bit-*.image)
CHANGES_FILE=$(find . -name Pharo*-${1}bit-*.changes)
Expand Down
4 changes: 2 additions & 2 deletions bootstrap/scripts/transform_32_into_64.sh
Expand Up @@ -59,8 +59,8 @@ for f in ${PHARO_NAME_PREFIX}-32bit-*.zip; do
printf "\231\002\320\003" > displaySize.bin
dd if="displaySize.bin" of="${PHARO_NAME_PREFIX}-64bit-$HASH.image" bs=1 seek=40 count=4 conv=notrunc

echo "70" > pharo.version
PHARO_SOURCES_PREFIX=$(echo "${PHARO_NAME_PREFIX}" | cut -d'-' -f 1)
echo "${PHARO_SHORT_VERSION}" > pharo.version
PHARO_SOURCES_PREFIX=$(echo "${PHARO_NAME_PREFIX}" | cut -d'-' -f 1 | cut -d'.' -f 1-2)
zip ${PHARO_NAME_PREFIX}-64bit-$HASH.zip ${PHARO_NAME_PREFIX}-64bit-$HASH.* ${PHARO_SOURCES_PREFIX}*.sources pharo.version
rm -f *.image *.changes *.sources
done
Expand Down
1 change: 1 addition & 0 deletions bootstrap/scripts/upload_to_files.pharo.org.sh
Expand Up @@ -12,6 +12,7 @@ echo "Uploading Images to pharo.files.org/$destDir"

scp -o StrictHostKeyChecking=no -v \
latest*.zip \
stable*.zip \
${PHARO_NAME_PREFIX}.build.*.zip \
${PHARO_NAME_PREFIX}-metacello.build.*.zip \
pharoorgde@ssh.cluster023.hosting.ovh.net:files/image/${PHARO_SHORT_VERSION}/
Expand Up @@ -30,7 +30,7 @@ initializeImage
'major' -> versionInfo major.
'minor' -> versionInfo minor.
'patch' -> versionInfo patch.
'suffix' -> versionInfo suffix.
'suffix' -> (versionInfo suffix ifNil: [ '' ]).
'build' -> versionInfo buildNumber.
'hash' -> versionInfo commitHash.
} asDictionary).
Expand Down

0 comments on commit 4455089

Please sign in to comment.