('directory', 'mongoc'), ]))]), shell_mongoc(r''' if [ "${is_patch}" = "true" ]; then VERSION=$(git describe --abbrev=7 --match='1.*')-patch-${version_id} else VERSION=latest fi echo "CURRENT_VERSION: $VERSION" > expansion.yml ''', test=False), OD([('command', 'expansions.update'), ('params', OD([ ('file', 'mongoc/expansion.yml'), ]))]), shell_exec(r''' rm -f *.tar.gz curl --retry 5 https://s3.amazonaws.com/mciuploads/${project}/${branch_name}/mongo-c-driver-${CURRENT_VERSION}.tar.gz --output mongoc.tar.gz -sS --max-time 120 ''', test=False, continue_on_err=True), )), ('upload release', Function( shell_exec( r'[ -f mongoc/cmake_build/mongo*gz ] && mv mongoc/cmake_build/mongo*gz mongoc.tar.gz', errexit=False, test=False), s3_put( '${project}/${branch_name}/mongo-c-driver-${CURRENT_VERSION}.tar.gz', project_path=False, aws_key='${aws_key}', aws_secret='${aws_secret}', local_file='mongoc.tar.gz', bucket='mciuploads', permissions='public-read', content_type='${content_type|application/x-gzip}'), )), ('upload build', Function( targz_pack('${build_id}.tar.gz', 'mongoc', './**'),
# This is a GitHub PR or patch build, probably branched from master echo $(python ./build/calc_release_version.py --next-minor) > VERSION_CURRENT VERSION=$VERSION_CURRENT-${version_id} else VERSION=latest fi echo "CURRENT_VERSION: $VERSION" > expansion.yml ''', test=False), OD([('command', 'expansions.update'), ('params', OD([ ('file', 'mongoc/expansion.yml'), ]))]), shell_exec(r''' rm -f *.tar.gz curl --retry 5 https://s3.amazonaws.com/mciuploads/${project}/${branch_name}/mongo-c-driver-${CURRENT_VERSION}.tar.gz --output mongoc.tar.gz -sS --max-time 120 ''', test=False, continue_on_err=True), )), ('upload release', Function( shell_exec( r'[ -f mongoc/cmake_build/mongo*gz ] && mv mongoc/cmake_build/mongo*gz mongoc.tar.gz', errexit=False, test=False), s3_put( '${project}/${branch_name}/mongo-c-driver-${CURRENT_VERSION}.tar.gz', project_path=False, aws_key='${aws_key}', aws_secret='${aws_secret}', local_file='mongoc.tar.gz',
def shell_mongoc(script, *args, **kwargs): return shell_exec(script, *args, working_dir='mongoc', **kwargs)
('directory', 'mongoc'), ]))]), shell_mongoc(r''' if [ "${is_patch}" = "true" ]; then VERSION=$(git describe --abbrev=7)-patch-${version_id} else VERSION=latest fi echo "CURRENT_VERSION: $VERSION" > expansion.yml ''', test=False), OD([('command', 'expansions.update'), ('params', OD([ ('file', 'mongoc/expansion.yml'), ]))]), shell_exec(r''' rm -f *.tar.gz curl --retry 5 https://s3.amazonaws.com/mciuploads/${project}/${branch_name}/mongo-c-driver-${CURRENT_VERSION}.tar.gz --output mongoc.tar.gz -sS --max-time 120 ''', test=False, continue_on_err=True), )), ('upload release', Function( shell_exec( r'[ -f mongoc/cmake_build/mongo*gz ] && mv mongoc/cmake_build/mongo*gz mongoc.tar.gz', errexit=False, test=False), s3_put( 'mongo-c-driver/${branch_name}/mongo-c-driver-${CURRENT_VERSION}.tar.gz', project_path=False, aws_key='${aws_key}', aws_secret='${aws_secret}', local_file='mongoc.tar.gz', bucket='mciuploads', permissions='public-read', content_type='${content_type|application/x-gzip}'), )), ('upload build', Function( targz_pack('${build_id}.tar.gz', 'mongoc', './**'),