MCPcopy Create free account
hub / github.com/apache/solr / pushLocal

Function pushLocal

dev-tools/scripts/buildAndPushRelease.py:213–239  ·  view source on GitHub ↗
(version, root, rcNum, localDir)

Source from the content-addressed store, hash-verified

211
212
213def pushLocal(version, root, rcNum, localDir):
214 print('Push local [%s]...' % localDir)
215 os.makedirs(localDir)
216
217 rev = open('%s/solr/distribution/build/release/.gitrev' % root, encoding='UTF-8').read()
218
219 dir = 'solr-%s-RC%d-rev-%s' % (version, rcNum, rev)
220 os.makedirs('%s/%s/solr/%s' % (localDir, dir, version))
221 print(' Solr')
222 solr_dist_dir = '%s/solr/distribution/build/release' % root
223 os.chdir(solr_dist_dir)
224 print(' archive...')
225 if os.path.exists('solr.tar'):
226 os.remove('solr.tar')
227 run('tar cf solr.tar *')
228
229 print(' extract...')
230 os.chdir('%s/%s/solr/%s' % (localDir, dir, version))
231 run('tar xf "%s/solr.tar"' % solr_dist_dir)
232 os.remove('%s/solr.tar' % solr_dist_dir)
233 os.chdir('..')
234
235 print(' chmod...')
236 run('chmod -R a+rX-w .')
237
238 print(' done!')
239 return 'file://%s/%s' % (os.path.abspath(localDir), dir)
240
241
242def read_version(path): # pylint: disable=unused-argument

Callers 1

mainFunction · 0.85

Calls 4

runFunction · 0.70
readMethod · 0.65
existsMethod · 0.65
removeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…