Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20321 add build number to system version #212

Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Jenkinsfile
Expand Up @@ -30,11 +30,11 @@ node('unix') {
stage ("Bootstrap-${architecture}") {
shell "mkdir -p bootstrap-cache #required to generate hermes files"
shell "./pharo Pharo.image ./bootstrap/scripts/generateHermesFiles.st --quit"
shell "./pharo ./Pharo.image bootstrap/scripts/bootstrap.st --ARCH=${architecture} --quit"
shell "./pharo ./Pharo.image bootstrap/scripts/bootstrap.st --ARCH=${architecture} --BUILD_NUMBER=${env.BUILD_ID} --quit"
}

stage ("Full Image-${architecture}") {
shell "BOOTSTRAP_ARCH=${architecture} bash ./bootstrap/scripts/build.sh -a ${architecture}"
shell "BUILD_NUMBER=${BUILD_NUMBER} BOOTSTRAP_ARCH=${architecture} bash ./bootstrap/scripts/build.sh -a ${architecture}"
stash includes: "bootstrap-cache/*.zip,bootstrap-cache/*.sources,bootstrap/scripts/**", name: "bootstrap${architecture}"
}

Expand Down
2 changes: 1 addition & 1 deletion bootstrap/scripts/bootstrap.sh
Expand Up @@ -5,6 +5,6 @@ unzip bootstrapImage.zip
./pharo Pharo.image ./bootstrap/scripts/prepare_image.st --save --quit
mkdir -p bootstrap-cache #required to generate hermes files
./pharo Pharo.image ./bootstrap/scripts/generateHermesFiles.st --quit
./pharo Pharo.image ./bootstrap/scripts/bootstrap.st --ARCH=${BOOTSTRAP_ARCH} --quit
./pharo Pharo.image ./bootstrap/scripts/bootstrap.st --ARCH=${BOOTSTRAP_ARCH} --BUILD_NUMBER=${BUILD_NUMBER} --quit

bash ./bootstrap/scripts/build.sh
2 changes: 2 additions & 0 deletions bootstrap/scripts/bootstrap.st
Expand Up @@ -3,6 +3,7 @@

options := CommandLineArguments default.
architecture := options optionAt: 'ARCH' ifAbsent: [ '32' ].
buildNumber := options optionAt: 'BUILD_NUMBER' ifAbsent: [ 'NO_CI' ].

"Configure logging"
(CustomStringStreamBeacon with: FileStream stdout)
Expand All @@ -14,6 +15,7 @@ FileStream stdout


(PBBootstrap forArchitecture: architecture)
buildNumber: buildNumber;
prepareBootstrap;
createImage

Expand Down
@@ -0,0 +1,4 @@
accessing
buildNumber: aBuildNumber

buildNumber := aBuildNumber
@@ -0,0 +1,4 @@
accessing
buildNumber

^ buildNumber
Expand Up @@ -3,5 +3,6 @@ createImage

(PBImageBuilderSpur50 forArchitecture: architecture)
gitRepositoryUrl: 'git@github.com:pharo-project/pharo.git' location: '.' subdirectory: 'src';
imageFileReference: imageReference;
imageFileReference: imageReference;
buildNumber: self buildNumber;
bootstrap.
Expand Up @@ -8,7 +8,8 @@
"instvars" : [
"architecture",
"kernelPackageNames",
"imageReference"
"imageReference",
"buildNumber"
],
"name" : "PBBootstrap",
"type" : "normal"
Expand Down
@@ -0,0 +1,4 @@
accessing
buildNumber: aNumber

buildNumber := aNumber
@@ -0,0 +1,4 @@
accessing
buildNumber

^ buildNumber
Expand Up @@ -25,13 +25,14 @@ initializeImage
type: ''Pharo'';
major: {major};
minor: {minor};
suffix: ''SNAPSHOT'';
commitHash: ''{update}'';
suffix: ''alpha.build.{build}.sha.{hash}'';
commitHash: ''{hash}'';
yourself).
PharoBootstrapInitialization initializeCommandLineHandlerAndErrorHandling' format: {
'major' -> definitionFetcher majorVersion asString.
'minor' -> definitionFetcher minorVersion asString.
'update' -> definitionFetcher commitHash asString.
'build' -> self buildNumber asString.
'hash' -> definitionFetcher commitHash asString.
} asDictionary).
objectSpace installAsActiveProcess: process.

Expand Down
Expand Up @@ -15,7 +15,8 @@
"definitionFetcher",
"statistics",
"logger",
"imageFileReference"
"imageFileReference",
"buildNumber"
],
"name" : "PBImageBuilder50",
"type" : "normal"
Expand Down
@@ -1,4 +1,4 @@
sources, change log
lastUpdateString
"SmalltalkImage current lastUpdateString"
^'Latest update: #', SystemVersion current highestUpdate printString
^'Build information: ', SystemVersion current suffix asString
@@ -1,11 +1,4 @@
accessing
highestUpdate
"Returns the highest number of available updates"

| sortedUpdates |
highestUpdate ifNil: [
sortedUpdates := self updates asSortedCollection.
highestUpdate := (sortedUpdates isEmpty
ifTrue: [0]
ifFalse: [sortedUpdates last])].
^highestUpdate

This file was deleted.

@@ -1,5 +1,4 @@
initialization
initialize
super initialize.
date := Date today.
updates := Set new.
date := Date today.
Expand Up @@ -3,8 +3,7 @@ majorMinor: aSeparatingString
"Return the major/minor version number of the form XaSeparatingStringY, without any 'alpha' or 'beta' or other suffix. If the receiver needs upgrading, do it. Remove the guard in 1.3."
"SystemVersion current majorMinor: '-'"
"SystemVersion current majorMinor: ''"

self upgrade.

^String streamContents: [:str |
str
nextPutAll: self major printString;
Expand Down
@@ -1,6 +1,3 @@
printing
printOn: stream
stream
nextPutAll: self datedVersion;
nextPutAll: ' update ';
nextPutAll: self highestUpdate printString
stream nextPutAll: self imageVersionString

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions src/System-Support.package/SystemVersion.class/instance/upgrade.st

This file was deleted.

Expand Up @@ -11,7 +11,6 @@
"version",
"date",
"highestUpdate",
"updates",
"type",
"major",
"minor",
Expand Down

This file was deleted.

This file was deleted.