ow-nuxeo 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,11 +31,7 @@
31
31
  #if($hasStudioProject != 'false')
32
32
  <profiles>
33
33
  <profile>
34
- <activation>
35
- <property>
36
- <name>release</name>
37
- </property>
38
- </activation>
34
+ <id>release</id>
39
35
  <properties>
40
36
  <${groupId}.studio.version>${project.version}</${groupId}.studio.version>
41
37
  </properties>
@@ -32,11 +32,11 @@ def putHeader(title)
32
32
  puts '=' * title.length
33
33
  end
34
34
 
35
- def runCommand(title, command)
35
+ def runCommand(title, command, ignoreFailure=false)
36
36
  putHeader 'Running: ' + title + ''
37
37
  puts '> ' + command
38
38
  puts
39
- if !system(command)
39
+ if !system(command) && !ignoreFailure
40
40
  putHeader 'ERROR: A command failed. Aborting.'
41
41
  raise 'failed system command'
42
42
  end
@@ -182,7 +182,7 @@ ARGV.each do |arg|
182
182
  system('chmod +x ' + nuxeoctlPath)
183
183
 
184
184
  runCommand('Uninstall package "' + MARKETPLACE_PACKAGE_NAME + '"',
185
- nuxeoctlPath + ' --accept=true --nodeps mp-remove ' + MARKETPLACE_PACKAGE_NAME)
185
+ nuxeoctlPath + ' --accept=true --nodeps mp-remove ' + MARKETPLACE_PACKAGE_NAME, true)
186
186
  runCommand('Install new marketplace package',
187
187
  nuxeoctlPath + ' --accept=true --nodeps mp-install ' + Dir[MARKETPLACE_PROJECT_PATH + '/target/' + MARKETPLACE_PROJECT_PATH.split('/').last + '-*.zip'][0])
188
188
 
@@ -194,24 +194,30 @@ ARGV.each do |arg|
194
194
  system(command)
195
195
 
196
196
  when 'reset'
197
- putHeader 'Nuxeo data reset'
198
- print "Delete all Nuxeo data ? (y/n, default is 'n') >> "
199
- case STDIN.gets.strip.downcase
200
- when 'y'
201
- if defined? NUXEO_PATH
202
- dataPath = NUXEO_PATH + 'nxserver/data/'
203
- deletePaths = Dir[dataPath + 'h2', dataPath + 'derby', dataPath + 'binaries']
204
- end
205
- if !deletePaths.nil? and deletePaths.size > 0
206
- puts '> Deleting Nuxeo data...'
207
- FileUtils.rm_r deletePaths, :force => true
208
- puts 'Done.'
209
- else
210
- puts 'Nothing to delete.'
211
- end
212
- else
213
- puts "Aborted."
214
- end
197
+ putHeader 'Nuxeo data reset'
198
+ if defined? NUXEO_PATH
199
+ dataPath = NUXEO_PATH + 'nxserver/data/'
200
+ deletePaths = Dir[dataPath + 'h2', dataPath + 'derby', dataPath + 'binaries', dataPath + 'elasticsearch']
201
+ if !deletePaths.nil? and deletePaths.size > 0
202
+ puts "Folders to be deleted:"
203
+ for path in deletePaths
204
+ puts "- " + path
205
+ end
206
+ print "Confirm? (y/n, default is 'n') >> "
207
+ case STDIN.gets.strip.downcase
208
+ when 'y'
209
+ puts '> Deleting Nuxeo data...'
210
+ FileUtils.rm_r deletePaths, :force => true
211
+ puts 'Done.'
212
+ else
213
+ puts "Aborted."
214
+ end
215
+ else
216
+ puts 'Nothing to delete.'
217
+ end
218
+ else
219
+ puts "Nuxeo path not set, aborting."
220
+ end
215
221
 
216
222
  # Project generation
217
223
  # ==================
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ow-nuxeo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-02 00:00:00.000000000 Z
12
+ date: 2015-11-09 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Eases common tasks for Nuxeo integrators, from creating a project from
15
15
  scratch to building and launching it.