Synchronizing before testing installation in other image.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2017-07-06 21:23:22 +00:00 committed by SantiagoBragagnolo
parent 62ece548b0
commit 51fd003964
2 changed files with 22 additions and 10 deletions

View File

@ -15,11 +15,29 @@ Class {
#category : #'Grafoscopio-Utils'
}
{ #category : #updating }
GrafoscopioDocumentation class >> listOutdatedDocs [
"I return the list of all documentent where the local copy and the remote copy doesn't match"
| docsRepo |
docsRepo := self newDefault.
^ docsRepo documents reject: [ :doc | (docsRepo isFileUpdatedFor: doc) ]
]
{ #category : #'as yet unclassified' }
GrafoscopioDocumentation class >> newDefault [
^ self new
]
{ #category : #updating }
GrafoscopioDocumentation class >> update [
self newDefault update
]
{ #category : #updating }
GrafoscopioDocumentation class >> updateAll [
self allInstancesDo: [ :docs | docs update ]
]
{ #category : #updating }
GrafoscopioDocumentation class >> updateAllUI [
"Updates documentation (manual, tutorials) from the official repository for a given documentation."
@ -50,7 +68,7 @@ GrafoscopioDocumentation >> download: fileNameWithRelativePath [
relativePathFolders do: [ :folder | newPath := newPath / folder ].
parentFolder := newPath asFileReference.
parentFolder exists ifFalse: [ parentFolder ensureCreateDirectory ].
GrafoscopioGenUtils
GrafoscopioUtils
downloadingFrom: self repository remote asString, '/doc/tip/', fileNameWithRelativePath
withMessage: 'Downloading ', fileName
into: parentFolder
@ -70,12 +88,6 @@ GrafoscopioDocumentation >> isFileUpdatedFor: relativeFilePath [
with: (self repository lastHashNumberFor: relativeFilePath) ]
]
{ #category : #updating }
GrafoscopioDocumentation >> listOutdatedDocs [
"I return the list of all documentent where the local copy and the remote copy doesn't match"
^ self documents reject: [ :doc | (self isFileUpdatedFor: doc) ]
]
{ #category : #accessing }
GrafoscopioDocumentation >> localPlace [
^ localPlace ifNil: [
@ -124,7 +136,7 @@ GrafoscopioDocumentation >> repository: anObject [
{ #category : #updating }
GrafoscopioDocumentation >> update [
(self listOutdatedDocs)
(self class listOutdatedDocs)
ifEmpty: [
self inform: 'All documents in the ', self name,' collection are already updated'.
^ self ]

View File

@ -3,13 +3,13 @@ I contain simple general functionality used by Grafoscopio, Dataviz
or other related projects.
"
Class {
#name : #GrafoscopioGenUtils,
#name : #GrafoscopioUtils,
#superclass : #Object,
#category : #'Grafoscopio-Utils'
}
{ #category : #'graphical interface' }
GrafoscopioGenUtils class >> downloadingFrom: downloadUrl withMessage: aString into: location [
GrafoscopioUtils class >> downloadingFrom: downloadUrl withMessage: aString into: location [
| fileName |
fileName := (downloadUrl splitOn: $/) last.
(location / fileName) exists ifTrue: [ (location / fileName) ensureDelete ].