-
Notifications
You must be signed in to change notification settings - Fork 591
/
.releash.py
72 lines (64 loc) · 3.3 KB
/
.releash.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
from releash import *
# these objects only tag when they are exe
gitpush = ReleaseTargetGitPush()
# core package
core = add_package("packages/vaex-core", "vaex-core")
version_core = VersionSource(core, '{path}/vaex/core/_version.py')
gittag_core = ReleaseTargetGitTagVersion(version_source=version_core, prefix='core-v')
core.version_source = version_core
core.version_targets.append(VersionTarget(core, '{path}/vaex/core/_version.py'))
core.version_targets.append(VersionTargetReplace(core, [
'packages/vaex/setup.py',
]))
def add_version_replace(package):
# for pre-releases we always bump all requirements that are exact matches
if not package.version_source.semver['prerelease']:
return
if any(k in package.version_source.semver['prerelease'] for k in "dev alpha beta rc"):
package.version_targets.append(VersionTargetReplace(package, [
'packages/vaex-arrow/setup.py',
'packages/vaex-graphql/setup.py',
'packages/vaex-hdf5/setup.py',
'packages/vaex-jupyter/setup.py',
'packages/vaex-ml/setup.py',
'packages/vaex-server/setup.py',
'packages/vaex-viz/setup.py',
'packages/vaex-contrib/setup.py',
], pattern='{name}(?P<cmp>[^0-9]*)' + str(package.version_source), ))
def add_meta_version_replace(package):
# always bump the meta package
package.version_targets.append(VersionTargetReplace(package, [
'packages/vaex/setup.py',
], pattern='{name}(?P<cmp>[^0-9]*)' + str(package.version_source), ))
add_version_replace(core)
add_meta_version_replace(core)
core.tag_targets.append(gittag_core)
core.release_targets.append(ReleaseTargetSourceDist(core))
#core.release_targets.append(gitpush)
core.release_targets.append(ReleaseTargetCondaForge(core, '../feedstocks/vaex-core-feedstock'))
packages = ['vaex-core', 'vaex', 'vaex-viz', 'vaex-hdf5', 'vaex-server', 'vaex-astro', 'vaex-jupyter', 'vaex-ml', 'vaex-graphql', 'vaex-contrib']
names = [k[5:] for k in packages[1:]]
for name in names:
if name == '':
name = 'meta'
if name == 'meta':
package = add_package("packages/vaex", "vaex-" +name, 'vaex.' + name, distribution_name='vaex')
version = VersionSource(package, '{path}/vaex/' +name +'/_version.py')
else:
package = add_package("packages/vaex-" + name, "vaex-" +name, 'vaex.' + name)
version = VersionSource(package, '{path}/vaex/' +name +'/_version.py')
gittag = ReleaseTargetGitTagVersion(version_source=version, prefix=name + '-v', msg='Release {version} of vaex-' +name)
package.version_source = version
package.version_targets.append(VersionTarget(package, '{path}/vaex/' + name + '/_version.py'))
add_version_replace(package)
add_meta_version_replace(package)
# it is ok to add this twice, it will only tag once
package.tag_targets.append(gittag)
package.release_targets.append(ReleaseTargetSourceDist(package))
# also ok to add twice, it will only execute for the last package
package.release_targets.append(gitpush)
#if name in ['hdf5', 'viz']:
if name == 'meta':
package.release_targets.append(ReleaseTargetCondaForge(package, '../feedstocks/vaex' + '-feedstock'))
else:
package.release_targets.append(ReleaseTargetCondaForge(package, '../feedstocks/vaex-' + name + '-feedstock'))