Example #1
0
# Commit correspondant
s.command('git add param/version.py')
s.command('git commit -m %s' %repr('Version ' + version))

archive_tar = "wxgeometrie_%s.tar" %version
archive_gz = archive_tar + '.gz'

print(u'\nCréation du paquet...')

# Nettoyage (inutile, sauf plantage précédent)
s.cd('..')
s.rmdir('build_', quiet=True)
s.rm(archive_gz, quiet=True)

# Création d'un répertoire temporaire build_/
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')
Example #2
0
        f.write(''.join(contenu).strip())

# Commit correspondant
s.command('git add param/version.py')
s.command('git commit -m %s' %repr('Version ' + version))

archive_tar = "wxgeometrie_%s.tar" %version
archive_gz = archive_tar + '.gz'

print(u'\nCréation du paquet...')

# Nettoyage (inutile, sauf plantage précédent)
s.cd('..')
s.rmdir('build_', quiet=True)
s.rm(archive_gz, quiet=True)
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.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
Example #3
0
    s.command('git add doc/changelog.txt')
    s.command('git add version.py')
    s.command('git commit -m %s' % repr('Version ' + version))

archive_tar = "%s_%s.tar" % (nom_prog, version)
archive_gz = archive_tar + '.gz'

print(u'\nCréation du paquet...')

# Nettoyage (inutile, sauf plantage précédent)
s.cd('..')
s.rmdir('build_', quiet=True)
s.rm(archive_gz, quiet=True)

# Création d'un répertoire temporaire build_/
s.mkdir('build_')
s.mkdir('build_/%s' % nom_prog)

if options.archive_only:
    s.command('git archive HEAD -o build_/%s.tar' % nom_prog)
else:
    # 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_/%s.tar' % (tag, nom_prog))

# Personnalisation du contenu
s.cd('build_')
s.command('tar -xf %s.tar --directory %s' % (nom_prog, nom_prog))