Skip to content

Commit

Permalink
Remove useless scripts and move scripts to the same folder
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Nov 21, 2023
1 parent 32611aa commit b70e016
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 87 deletions.
File renamed without changes.
48 changes: 45 additions & 3 deletions .github/scripts/preLoading.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
#( 'BaselineOfLibGit' 'BaselineOfIceberg' ) do: [ :each |
(RPackageOrganizer default packageNamed: each ifAbsent: [ nil ])
ifNotNil: [ :aPackage | aPackage removeFromSystem ] ]
"Shutdown Libgit"
LGitLibrary shutDown: true.

"Unregister all iceberg repository adapters since we are going to unload all code related to it.
Otherwise obsolete instances will stay".
IceMetacelloRepositoryAdapter allInstances do: #unregister.
Smalltalk globals at: #IceSystemEventListener ifPresent: #unregisterSystemAnnouncements.

"Workaround to avoid keeping an entry in World Menu to the obsolete class."
(IceTipRepositoriesBrowser class>>#menuCommandOn:) removeFromSystem.

"Remove iceberg from system (so I can reload it)"
MetacelloPharoPlatform select.
#(
'BaselineOfLibGit'
'BaselineOfIceberg'
'Iceberg-UI'
'Iceberg-TipUI'
'Iceberg-Plugin-Pharo'
'Iceberg-Plugin-Metacello'
'Iceberg-Plugin-GitHub'
'Iceberg-Plugin-Migration'
'Iceberg-Plugin'
'Iceberg-Metacello-Integration'
'Iceberg-Libgit-Tonel'
'Iceberg-Libgit-Filetree'
'Iceberg-Libgit'
'Iceberg-Tests'
'Iceberg-Memory'
'Iceberg-UI-Tests'
'Iceberg-Core'
'Iceberg-Changes'
'Iceberg-Adapters'
'Iceberg'
'Iceberg-GitCommand'
'Iceberg-SmartUI'
'Iceberg-Pharo6'
'LibGit-Core')
do: [ :each |
(each asPackageIfAbsent: [
(each , ' not found') traceCr.
nil ])
ifNotNil: [ :package |
('Removing ', each) traceCr.
package removeFromSystem ] ]
3 changes: 0 additions & 3 deletions .github/scripts/preTesting.st

This file was deleted.

File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/workflows/sync-wiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
name: Sync GitHub Wiki from Sources
steps:
- run: ./scripts/sync-wiki.sh
- run: ./.github/scripts/sync-wiki.sh

This comment has been minimized.

Copy link
@tinchodias

tinchodias Nov 21, 2023

Collaborator

IMHO these scripts are independent from github. Probably before were run by travis. And I remember I have run them locally from command line.

I don't mean to revert the commit, but would like to know more of the reasons.
Cheers, Martín

This comment has been minimized.

Copy link
@jecisc

jecisc Nov 21, 2023

Author Contributor

We had some pre/post load script in both .github and scripts with one of the version not used (but people do not know that and lose time checking and updating them. Esteban got this problem last month.

So I wanted to unify them. Also, I prefer to have all scripts in one place. I choose .github/scripts because I have the habits of having them here but I can have them in /scripts if you prefer. I just don't want multiple pre/post load scripts and multiple places for scripts :)

This comment has been minimized.

Copy link
@tinchodias

tinchodias Nov 21, 2023

Collaborator

Oh no, duplication / outdated scripts is bad, so okay, thanks Cyril for taking care of this.

This comment has been minimized.

Copy link
@jecisc

jecisc Nov 21, 2023

Author Contributor

I moved all scripts to /scripts instead of /.github/scripts

env:
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
shell: bash
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,11 @@ jobs:
runs-on: ${{ matrix.os }}
name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup smalltalkCI
uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-image: ${{ matrix.smalltalk }}
# - name: Load Image and Run Release Tests
# run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalk.release.ston
# timeout-minutes: 10
# - name: Clean Up
# run: rm -Rf ${{ env.SMALLTALK_CI_BUILD }}
smalltalk-version: ${{ matrix.smalltalk }}
- name: Load Image and Run Tests
run: smalltalkci -s ${{ matrix.smalltalk }} ${{ matrix.ston }}
shell: bash
Expand Down
3 changes: 1 addition & 2 deletions .project
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
'srcDirectory' : '',
'tags' : [ #system ]
'srcDirectory' : ''
}
18 changes: 0 additions & 18 deletions .smalltalk.release.ston

This file was deleted.

4 changes: 2 additions & 2 deletions .smalltalk.ston
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SmalltalkCISpec {
#name: 'Iceberg',
#preLoading: 'scripts/preLoading.st',
#postLoading: 'scripts/postLoading.st',
#preLoading: '.github/scripts/preLoading.st',
#postLoading: '.github/scripts/postLoading.st',
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'Iceberg',
Expand Down
4 changes: 2 additions & 2 deletions .smalltalk.windows.ston
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SmalltalkCISpec {
#name: 'Iceberg',
#preLoading: 'scripts/preLoading.st',
#postLoading: 'scripts/postLoading.st',
#preLoading: '.github/scripts/preLoading.st',
#postLoading: '.github/scripts/postLoading.st',
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'Iceberg',
Expand Down
8 changes: 4 additions & 4 deletions docs/Contributing-to-Iceberg.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ To do that, it's needed to create a pull request to one of the following branche

Loading Iceberg in Pharo is more difficult than updating other projects -that just use a "Metacello script"- since normally Metacello will rely on Iceberg to update Iceberg.

That's the reason to have [a bash update script](../scripts/testUpdateIceberg.sh) that performs some pre- and post-load actions.
That's the reason to have [a bash update script](../.github/scripts/testUpdateIceberg.sh) that performs some pre- and post-load actions.
Steps to use it:
1. Open a terminal
2. Clone this repository and checkout the desired branch
3. Execute `./scripts/testUpdateIceberg.sh --dev`
3. Execute `./.github/scripts/testUpdateIceberg.sh --dev`
4. Execute `./pharo-ui Pharo.image`

Also, the script loads the `development` Metacello group, which contains some tests that are not present in the Pharo image normally.
Expand All @@ -30,14 +30,14 @@ About Windows platform, we know it worked in the MINGW64 Bash Console that came

## Contributions to Wiki

We count with [a bash script](../scripts/sync-wiki.sh) that deploys the markdown files in `doc/` directory to the Wiki section.
We count with [a bash script](../.github/scripts/sync-wiki.sh) that deploys the markdown files in `doc/` directory to the Wiki section.
The entry point for the wiki is the [Home page](Home.md).

A while ago, Travis CI executed such bash script each time the `master` branch changed.
This is not working for the moment, but contributors can execute the following command in a terminal:

```bash
export GH_TOKEN=<<TOKEN>> && ./scripts/sync-wiki.sh
export GH_TOKEN=<<TOKEN>> && ./.github/scripts/sync-wiki.sh
```
where `<<TOKEN>>` is a [GitHub Personal Token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with repo:write permissions on this repository.
45 changes: 0 additions & 45 deletions scripts/preLoading.st

This file was deleted.

0 comments on commit b70e016

Please sign in to comment.