Skip to content

Commit

Permalink
Check for new version before manual self-update
Browse files Browse the repository at this point in the history
Closes #59.
  • Loading branch information
MariusDoe committed Dec 23, 2024
1 parent 4cda875 commit 5743b7c
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
actions
actionSelfUpdate
GSSelfUpdater selfUpdate.
GSSelfUpdater actionSelfUpdate.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"actionPull" : "mad 12/1/2024 21:45",
"actionPush" : "mad 12/1/2024 21:45",
"actionRefresh" : "mad 12/23/2024 20:01",
"actionSelfUpdate" : "mad 10/9/2024 16:47",
"actionSelfUpdate" : "mad 12/23/2024 21:06",
"actionSetSelfUpdateBranch" : "mad 11/4/2024 13:13",
"activeCommit" : "mad 9/14/2023 15:24",
"activeCommit:" : "mad 5/15/2024 21:42",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
self-updating
actionSelfUpdate
(self isNewVersionAvailableIfError: [true]) ifFalse: [
(self confirm: 'No new version seems to be available. Do you want to update anyway?')
ifFalse: [^ self]].
self selfUpdate.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
check
basicCheckForNewVersion
self isNewVersionAvailable ifTrue: [self promptForNewVersion].
(self isNewVersionAvailableIfError: [^ self]) ifTrue: [self promptForNewVersion].
self lastVersionCheck: DateAndTime now.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ changeLog
'Warnings about uncommitted changes before merging only occur when not up-to-date.'.
'The list of branches, remote branches, etc. is now a tree. Hover over the root nodes to get an explanation.'.
'A change log is shown after a self-update (the one you are currently seeing :)).'.
'Before a manual self-update is done, git-s checks whether a new version exists and prompts the user to cancel if not.'.
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
check
isNewVersionAvailableIfError: aBlock
^ ([self getShaOfVersion: self branchName] ifError: [^ aBlock value]) ~= self installedVersion
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"class" : {
"basicCheckForNewVersion" : "mad 10/25/2024 11:34",
"actionSelfUpdate" : "mad 12/23/2024 21:06",
"basicCheckForNewVersion" : "mad 12/23/2024 21:01",
"branchName" : "mad 11/4/2024 13:01",
"branchName:" : "mad 11/4/2024 13:02",
"changeLog" : "mad 12/23/2024 21:12",
"changeLog" : "mad 12/23/2024 21:15",
"checkForNewVersion" : "mad 10/25/2024 11:32",
"fullRepositoryName" : "mad 10/9/2024 16:33",
"getShaOfVersion:" : "mad 10/24/2024 15:07",
Expand All @@ -12,7 +13,7 @@
"installScriptForVersion:" : "mad 10/9/2024 16:50",
"installedVersion" : "mad 10/9/2024 16:40",
"installedVersion:" : "mad 10/9/2024 16:40",
"isNewVersionAvailable" : "mad 10/25/2024 11:22",
"isNewVersionAvailableIfError:" : "mad 12/23/2024 21:01",
"lastVersionCheck" : "mad 10/25/2024 11:33",
"lastVersionCheck:" : "mad 10/25/2024 11:34",
"lastVersionCheckWasRecent" : "mad 10/25/2024 11:35",
Expand Down

0 comments on commit 5743b7c

Please sign in to comment.