def step_impl(context, tag): utils.run_with_project_in_path( 'git -C {0} commit --allow-empty --no-gpg-sign -m "creating an unsigned commit"' .format(context.mock_developer_dir), context) utils.run_with_project_in_path( 'git -C {0} tag -s {1} -m {1}'.format(context.mock_developer_dir, tag), context)
def step_impl(context, position): context.target_branch = 'devel' args = [context.branch_name, context.target_branch] args.insert(int(position), '--no-prune') command = 'git -C {0} merge-pr {1} {2} {3}'.format( context.mock_developer_dir, args[0], args[1], args[2]) utils.run_with_project_in_path(command, context)
def step_impl(context, target): context.target_branch = target command = 'git -C {0} merge-pr {1} {2}'.format(context.mock_developer_dir, context.branch_name, context.target_branch) context.out, context.err, context.rc = utils.run_with_project_in_path( command, context)
def step_impl(context): command = "git -C {0} log --max-count=1 --parents --format=oneline {1}".format( context.mock_github_dir, context.target) log_output, unused, rc = utils.run_with_project_in_path(command, context) fields = log_output.split() context.sha_hash = fields[0] assert_that(log_output, not_(contains_string(context.tag)))
def most_recent_file_contents(context): command = 'find {0} -maxdepth 1 -type f'.format(context.mock_github_dir) out, err, code = utils.run_with_project_in_path(command, context) most_recent_filename = out.strip().split()[-1] content = '' with open(most_recent_filename, 'rb') as content_file: content = content_file.read() return content
def step_impl(context, command): cmd = 'git -C {0} {1} -h'.format(context.mock_developer_dir, command) context.out, context.err, context.rc = utils.run_with_project_in_path( cmd, context)
def step_impl(context, branch): command = 'git -C {0} checkout -b {1}'.format(context.mock_developer_dir, branch) utils.run_with_project_in_path(command, context)
def step_impl(context): command = "git -C {0} describe {1}".format(context.mock_github_dir, context.target) describe_output, unused, rc = utils.run_with_project_in_path( command, context) assert_that(describe_output, equal_to_ignoring_whitespace(context.tag))
def step_impl(context, branch): command = 'git -C {0} promote {1} {2}'.format(context.mock_developer_dir, context.prerelease, branch) context.out, context.err, context.rc = utils.run_with_project_in_path( command, context)
def step_impl(context, directory): command = 'git -C {0} promote {1} {2}'.format(context.wd, context.prerelease, context.target) context.out, context.err, context.rc = utils.run_with_project_in_path( command, context)
def step_impl(context, branch): out, err, rc = utils.run_with_project_in_path( 'git -C {0} branch'.format(context.mock_developer_dir), context) assert_that(out, contains_string(branch))
def checkout_rsl_branch(context): command = 'git -C {0} checkout rsl'.format(context.mock_github_dir) utils.run_with_project_in_path(command, context)
def step_impl(context, release_tag): command = 'git -C {0} tag -s {1} -m {1}'.format(context.mock_github_dir, release_tag) utils.run_with_project_in_path(command, context)
def step_impl(context): branch, err, rc = utils.run_with_project_in_path( 'git -C {0} symbolic-ref --short HEAD'.format( context.mock_developer_dir), context) utils.run_with_project_in_path( 'git -C {0} checkout -q devel'.format(context.mock_developer_dir), context) utils.shell_command( 'cp -a {0}/features/test_file.txt {1}/test_file.txt'.format( os.getcwd(), context.mock_developer_dir)) utils.run_with_project_in_path( 'git -C {0} add test_file.txt'.format(context.mock_developer_dir), context) utils.run_with_project_in_path( 'git -C {0} commit -m "creating a merge conflict in devel"'.format( context.mock_developer_dir), context) utils.run_with_project_in_path( 'git -C {0} push origin devel'.format(context.mock_developer_dir), context) utils.run_with_project_in_path( 'git -C {0} checkout feature'.format(context.mock_developer_dir), context) utils.shell_command( 'cp -a {0}/features/test_file2.txt {1}/test_file.txt'.format( os.getcwd(), context.mock_developer_dir)) utils.run_with_project_in_path( 'git -C {0} add test_file.txt'.format(context.mock_developer_dir), context) utils.run_with_project_in_path( 'git -C {0} commit -m "a merge conflict from feature"'.format( context.mock_developer_dir), context) utils.run_with_project_in_path( 'git -C {0} push origin feature'.format(context.mock_developer_dir), context) utils.run_with_project_in_path( 'git -C {0} checkout -q {1}'.format(context.mock_developer_dir, branch), context)
def step_impl(context): command = 'git -C {0} config --local user.signingkey 00000000'.format( context.mock_developer_dir) utils.run_with_project_in_path(command, context)
def step_impl(context, tag): utils.run_with_project_in_path( 'git -C {0} tag -a {1} -m {1}'.format(context.mock_developer_dir, tag), context)
def step_impl(context, directory): wd = '{0}/{1}'.format(context.mock_developer_dir, directory) utils.run_with_project_in_path( 'mkdir {0}/{1}'.format(context.mock_developer_dir, directory), context) context.wd = wd
def step_impl(context): utils.run_with_project_in_path( 'git -C {0} push origin :feature'.format(context.mock_developer_dir), context)
def step_impl(context, action, directory): command = 'git -C {0} {1}'.format(context.wd, action) context.out, context.err, context.rc = utils.run_with_project_in_path( command, context)
def step_impl(context, directory): command = 'git -C {0} merge-pr feature devel'.format(context.wd) context.out, context.err, context.rc = utils.run_with_project_in_path( command, context)
def step_impl(context): command = "git -C {0} verify-commit {1}".format(context.mock_github_dir, context.sha_hash) unused, verify_output, rc = utils.run_with_project_in_path( command, context) assert_that(verify_output, contains_string('Signature made'))