ow-nuxeo 0.2.1 → 0.2.3

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.
Files changed (2) hide show
  1. data/bin/ow-nuxeo +47 -23
  2. metadata +4 -4
@@ -49,18 +49,23 @@ def displayHelp()
49
49
  puts 'ow-nuxeo setversion 1.0.0'
50
50
  puts 'ow-nuxeo release'
51
51
  puts ''
52
- puts '> AVAILABLE GOALS'
53
- puts 'init : Starts a wizard to create a new Nuxeo project.'
54
- puts 'build : Build with tests.'
55
- puts 'fastbuild : Build, skip the tests to go faster'
56
- puts 'fastestbuild : Build, skip the tests and run offline to go faster (consequence: won\'t update any SNAPSHOT from remote repos, like NxStudio plugins)'
57
- puts 'release : Build with tests and the "release" flag enabled, to enable the use of the tagged NxStudio plugin'
58
- puts 'setversion [VERSION] : Updates the modules version. Specify the new version number as the second parameter.'
59
- puts 'test : Run the Maven tests only, in debug mode'
60
- puts 'deploy : Deploy the marketplace package'
61
- puts 'reset : Reset the data of your custom Nuxeo (by deleting the nxserver/data folder, i.e. it only works with Derby/H2)'
62
- puts 'run : Runs Nuxeo in console mode'
63
- puts 'version : Displays ow-nuxeo version'
52
+ puts '> AVAILABLE GOALS / BUILD'
53
+ puts 'build : Full build'
54
+ puts 'fastbuild : Build, but skip the tests'
55
+ puts 'fastestbuild : Build, but skip the tests and run offline (note: won\'t update any SNAPSHOT from remote repos, like Nuxeo Studio plugins)'
56
+ puts 'test : Run the Maven tests only, in debug mode'
57
+ puts 'release : Full build with the "release" flag enabled, to enable the use of the tagged NxStudio plugin'
58
+ puts ''
59
+ puts '> AVAILABLE GOALS / SERVER CONTROL'
60
+ puts 'deploy : Deploy the marketplace package to your instance'
61
+ puts 'run : Run Nuxeo in console mode'
62
+ puts 'reset : Resets the data of your Derby/H2 server (will only purge the binaries if you\'re using an external database)'
63
+ puts ''
64
+ puts '> AVAILABLE GOALS / TOOLS'
65
+ puts 'init : Starts a wizard to create a new Nuxeo project.'
66
+ puts 'getversion : Returns the current version of your project.'
67
+ puts 'setversion [V] : Updates the project version (will be reflected on all modules of the root POM). Parameter [V] is the new version number.'
68
+ puts 'version : Displays ow-nuxeo version'
64
69
  puts ''
65
70
  end
66
71
 
@@ -80,9 +85,20 @@ ARGV.each do |arg|
80
85
  when 'fastestbuild'
81
86
  system('mvn clean install -DskipTests=true -o')
82
87
 
88
+ when 'getversion'
89
+ File.open(MARKETPLACE_PROJECT_PATH + '/pom.xml') do |f|
90
+ f.any? do |line|
91
+ if line.include?('<version>')
92
+ puts line.gsub(/ *<\/?version>/, '')
93
+ break
94
+ end
95
+ end
96
+ end
97
+
83
98
  when 'setversion'
84
99
  if !ARGV[1].nil?
85
100
  system('mvn versions:set -DnewVersion=' + ARGV[1])
101
+ break
86
102
  else
87
103
  puts "Usage: ow-nuxeo setversion [VERSION]"
88
104
  end
@@ -104,14 +120,22 @@ ARGV.each do |arg|
104
120
  system(nuxeoctl() + ' console')
105
121
 
106
122
  when 'reset'
107
- if defined? NUXEO_PATH
108
- deletePath = Dir[NUXEO_PATH + 'nxserver/data'][0]
109
- end
110
- if !deletePath.nil?
111
- puts '> Deleting', deletePath
112
- FileUtils.rm_r deletePath, :force => true
113
- else
114
- puts '> Nothing to delete'
123
+ print "Delete all Nuxeo data ? (y/n, default is 'n') >> "
124
+ case STDIN.gets.strip.downcase
125
+ when 'y'
126
+ if defined? NUXEO_PATH
127
+ dataPath = NUXEO_PATH + 'nxserver/data/'
128
+ deletePaths = Dir[dataPath + 'h2', dataPath + 'derby', dataPath + 'binaries']
129
+ end
130
+ if !deletePaths.nil? and deletePaths.size > 0
131
+ puts '> Deleting Nuxeo data...'
132
+ FileUtils.rm_r deletePaths, :force => true
133
+ puts 'Done.'
134
+ else
135
+ puts 'Nothing to delete.'
136
+ end
137
+ else
138
+ puts "Aborted."
115
139
  end
116
140
 
117
141
  when 'version'
@@ -161,7 +185,7 @@ ARGV.each do |arg|
161
185
  projectInfo['vendor'] = defaultVendor
162
186
  end
163
187
  print "[OPTIONAL] Are you using a Nuxeo Studio project? (y/n, default is 'n') >> "
164
- projectInfo['hasStudioProject'] = STDIN.gets.strip
188
+ projectInfo['hasStudioProject'] = STDIN.gets.strip.downcase
165
189
  case projectInfo['hasStudioProject']
166
190
  when 'y'
167
191
  projectInfo['hasStudioProject'] = 'true'
@@ -194,8 +218,8 @@ ARGV.each do |arg|
194
218
  puts "\n\n[3/3] OPEN-WIDE INFORMATION"
195
219
  puts "==========================="
196
220
  print "Is this an Open Wide project? (y/n, default is 'n') >> "
197
- projectInfo['isOpenwideProject'] = STDIN.gets.strip
198
- projectInfo['isOpenwideProject'] = (projectInfo['isOpenwideProject'].downcase == 'y') ? 'true' : 'false'
221
+ projectInfo['isOpenwideProject'] = STDIN.gets.strip.downcase
222
+ projectInfo['isOpenwideProject'] = (projectInfo['isOpenwideProject'] == 'y') ? 'true' : 'false'
199
223
  if projectInfo['isOpenwideProject'] == 'true'
200
224
  puts "\nThe following variables are used to generate a sample ~/.m2/settings.xml."
201
225
  print "[OPTIONAL] Open Wide Maven username >> "
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.2.1
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,10 +9,10 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-02 00:00:00.000000000 Z
12
+ date: 2013-10-10 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: Eases common tasks with Nuxeo projects, from instanciating a client project
15
- to building and launching it.
14
+ description: Eases common tasks for Nuxeo integrators, from creating a project from
15
+ scratch to building and launching it.
16
16
  email: marwane.kalam-alami@openwide.fr
17
17
  executables:
18
18
  - ow-nuxeo