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

Question: Updating a Squot repository via Metacello? #241

Closed
LinqLover opened this issue Oct 17, 2019 · 4 comments
Closed

Question: Updating a Squot repository via Metacello? #241

LinqLover opened this issue Oct 17, 2019 · 4 comments

Comments

@LinqLover
Copy link
Contributor

Hi,

again not sure whether this is really a question about Squot but not Metacello, but I would appreciate your help in every case.

I set up a simple repository with Baseline and Squot and installed it into a fresh image using

Metacello new
	baseline: 'TipOfTheDay';
	repository: 'github://LinqLover/Squeak-TipOfTheDay/packages';
	load.

However, when I push a new commit to the repo and execute the code above again in the fresh image, the package is not updated but the old code version remains. Even clearing my working copy or removing the whole package from the fresh image did not help with it.

What I am doing wrong, or might this even be a bug? How can I update and installed Squot repo using Metacello? Thanks in advance!

@j4yk
Copy link
Collaborator

j4yk commented Oct 17, 2019

It has nothing to do with Squot, but with Metacello, indeed. In my opinion, it lacks a simple update or upgrade function...

You can have a look at the self update function in the Git Browser though:

image

selfUpdateFromMetacello
	"Close all instances before updating to avoid any UI glitches"
	self allInstancesDo: [:each | each changed: #close].
	(Smalltalk at: #Metacello) new
		baseline: 'Squot';
		repository: 'github://hpi-swa/Squot:', self selfUpdateBranch, '/src';
		get; load.
	"UpdateWorkingCopy loadVersion: UpdateWorkingCopy baseVersion interactive: false."
	SquitBrowser open

If it does not work for your repo, please let me know.

@LinqLover
Copy link
Contributor Author

Thanks for the reply!

I think my code above is equivalent to yours; I also added the #get but the new code still is not loaded. Might the line that is commented out be relevant, or is it very specific to Squot itself?

@j4yk
Copy link
Collaborator

j4yk commented Oct 19, 2019

The code that is commented out is only relevant to Squot itself -- or rather it isn't since it is commented out. :-)

If the get; load combination does not work, then maybe even the self update of Squot is broken. :-(

The Metacello user guide reads like you should use the following to update your project:

Metacello image
	baseline: 'TipOfTheDay';
	get;
        load.

https://github.com/dalehenrich/metacello-work/blob/master/docs/MetacelloUserGuide.md

The get updates the baseline (the dependencies might have changed), the load then updates the project according to the updated baseline.

If it does not work, I suggest you open an issue there.

@LinqLover
Copy link
Contributor Author

Thanks, Jakob, I tried it again without success. I opened Metacello/metacello#513.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants