Example #1
0
# Création du tag de release
tag = 'v' + version
s.command('git tag -am %s %s' %(repr(options.message or 'Version ' + version), tag))

# Récupération des fichiers via git
s.cd('wxgeometrie')
s.command('git archive %s -o ../build_/wxgeometrie.tar' %tag)
s.cd('../build_')
s.command('tar -xf wxgeometrie.tar --directory wxgeometrie')
s.rm('wxgeometrie.tar')

# Personnalisation du contenu
s.cp('../README.md', 'wxgeometrie/README')
s.cp('../INSTALL', 'wxgeometrie/INSTALL')
s.cp('../LICENSE', 'wxgeometrie/LICENSE')
s.mkdir('wxgeometrie/tools')
s.cp('../tools/scriptlib.py', 'wxgeometrie/tools/scriptlib.py')
s.rename('wxgeometrie/param/personnaliser_.py', 'wxgeometrie/param/personnaliser.py')

# Création de l'archive .tar.gz
s.command('tar -cf %s wxgeometrie' %archive_tar)
s.command('gzip %s' %archive_tar)
s.mv(archive_gz, options.output)

print(u'\nPaquet créé dans %s.\n' %os.path.abspath(options.output))

# Nettoyage
s.cd('..')
s.rmdir('build_')
Example #2
0
s.mkdir('build_')
s.mkdir('build_/wxgeometrie')

# Création du tag de release
tag = 'v' + version
s.command('git tag -am %s %s' %(repr(options.message or 'Version ' + version), tag))

# Récupération des fichiers via git
s.command('git archive %s -o build_/wxgeometrie.tar' %tag)
s.cd('build_')
s.command('tar -xf wxgeometrie.tar --directory wxgeometrie')
s.rm('wxgeometrie.tar')

# Personnalisation du contenu
s.cd('wxgeometrie')
s.rename('README.md', 'README')
s.rm('MANIFEST.in')
s.rm('.gitignore')
s.rename('wxgeometrie/param/personnaliser_.py', 'wxgeometrie/param/personnaliser.py')
s.cd('..')

# Création de l'archive .tar.gz
s.command('tar -cf %s wxgeometrie' %archive_tar)
s.command('gzip %s' %archive_tar)
s.mv(archive_gz, options.output)

print(u'\nPaquet créé dans %s.\n' %os.path.abspath(options.output))

# Nettoyage
s.cd('..')
s.rmdir('build_')