Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use release script in cli #149

Merged
merged 1 commit into from
Jan 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 7 additions & 21 deletions hack/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def check_antipackage():
'memcached': '0.1.0-beta.0',
'redis': '0.1.0-beta.0'
}
DATABASES = ['postgres', 'elasticsearch', 'mysql', 'mongodb', 'memcached', 'redis']


def die(status):
Expand Down Expand Up @@ -141,7 +142,7 @@ def release_apimachinery(self):
call('git tag -fa {0} -m "Release {0}"'.format(tag), cwd=repo)
call('git push origin {0} --tags --force'.format(release_branch), cwd=repo)

def release_db(self, repo_name, short_code):
def release_db(self, repo_name):
tag = RELEASE_TAGS[repo_name]
version = semver.parse(tag)
release_branch = 'release-{0}.{1}'.format(version['major'], version['minor'])
Expand All @@ -168,8 +169,7 @@ def release_db(self, repo_name, short_code):
call('git tag -fa {0} -m "Release {0}"'.format(tag), cwd=repo)
call('git push origin {0} --tags --force'.format(release_branch), cwd=repo)
call('rm -rf dist', cwd=repo)
call('./hack/docker/{0}-operator/setup.sh'.format(short_code), cwd=repo)
call('env APPSCODE_ENV=prod ./hack/docker/{0}-operator/setup.sh release'.format(short_code), cwd=repo)
call('./hack/release.sh', cwd=repo)
git_checkout('master', cwd=repo)
glide_mod(glide_config, self.master_deps)
glide_write(glide_file, glide_config)
Expand Down Expand Up @@ -252,28 +252,14 @@ def release(comp=None):
cat = Kitten()
if comp is None:
cat.release_apimachinery()
cat.release_db('postgres', 'pg')
cat.release_db('elasticsearch', 'es')
cat.release_db('mysql', 'my')
cat.release_db('mongodb', 'mg')
cat.release_db('memcached', 'mc')
cat.release_db('redis', 'rd')
for name in DATABASES:
cat.release_db(name)
cat.release_operator()
cat.release_cli()
elif comp == 'apimachinery':
cat.release_apimachinery()
elif comp in ['postgres', 'pg']:
cat.release_db('postgres', 'pg')
elif comp in ['elasticsearch', 'es']:
cat.release_db('elasticsearch', 'es')
elif comp in ['mysql', 'my']:
cat.release_db('mysql', 'my')
elif comp in ['mongodb', 'mg']:
cat.release_db('mongodb', 'mg')
elif comp in ['memcached', 'mc']:
cat.release_db('memcached', 'mc')
elif comp in ['redis', 'rd']:
cat.release_db('redis', 'rd')
elif comp in DATABASES:
cat.release_db(comp)
elif comp == 'operator':
cat.release_operator()
elif comp == 'cli':
Expand Down