Skip to content

Commit d115563

Browse files
committed
Modifies build scripts to yield a screenshot
1 parent 10af00d commit d115563

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,11 @@ jobs:
3232
uses: actions/upload-artifact@v2
3333
if: matrix.os == 'ubuntu-latest'
3434
with:
35-
name: image
35+
name: Babylonian-trunk.zip
3636
path: ./deploy/Babylonian-trunk.zip
37+
- name: Upload Image
38+
uses: actions/upload-artifact@v2
39+
if: matrix.os == 'ubuntu-latest'
40+
with:
41+
name: screenshot
42+
path: ./deploy/screenshot-for-readme.png

scripts/prepare_image.st

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
| browserWindow |
12
FileStream startUp: true.
23
TranscriptStream redirectToStdOut: true.
34
Deprecation showDeprecationWarnings: false.
@@ -25,7 +26,13 @@ PluggableSystemWindow allInstances do: #abandon.
2526
PreferenceWizardMorph allInstances do: #abandon.
2627
SystemBrowser default: BPBrowser.
2728

28-
((Smalltalk at: #BPFancyMorph)>>#initialize) browse.
29+
30+
"Take a screenshot"
31+
browserWindow := (ToolSet default browse: (Smalltalk at: #BPSearchCollection) selector: #binarySearch:) containingWindow.
32+
browserWindow extent: 891@806.
33+
(browserWindow submorphsSatisfying: [:m | (m isKindOf: ProportionalSplitterMorph) and: [m width > m height]]) first repositionBy: 0@(-100).
34+
browserWindow topLeft: 30@30.
35+
browserWindow exportAsPNGNamed: 'screenshot-for-readme.png'.
2936

3037
TranscriptStream redirectToStdOut: false.
3138
Deprecation suppressed: false.

0 commit comments

Comments
 (0)