(ctx)
Write the `requirements-agent-release.txt` file at the root of the repo
    listing all the Agent-based integrations pinned at the version they currently
    have in HEAD.
Write the `requirements-agent-release.txt` file at the root of the repo
    listing all the Agent-based integrations pinned at the version they currently
    have in HEAD.
Write the requirements - agent - release . txt file at the root of the repo listing all the Agent - based integrations pinned at the version they currently have in HEAD .
def requirements(ctx):
    """Write the `requirements-agent-release.txt` file at the root of the repo
    listing all the Agent-based integrations pinned at the version they currently
    have in HEAD.
    """
    echo_info('Freezing check releases')
    checks = get_valid_checks()
    checks.remove('datadog_checks_dev')

    entries = []
    for check in checks:
        if check in AGENT_V5_ONLY:
            echo_info(f'Check `{check}` is only shipped with Agent 5, skipping')
            continue

        try:
            version = get_version_string(check)
            entries.append(f'{get_agent_requirement_line(check, version)}\n')
        except Exception as e:
            echo_failure(f'Error generating line: {e}')
            continue

    lines = sorted(entries)

    req_file = get_agent_release_requirements()
    write_file_lines(req_file, lines)
    echo_success(f'Successfully wrote to `{req_file}`!')
def requirements ( ctx ) : echo_info ( 'Freezing check releases' ) checks = get_valid_checks ( ) checks . remove ( 'datadog_checks_dev' ) entries = [ ] for check in checks : if check in AGENT_V5_ONLY : echo_info ( f'Check `{check}` is only shipped with Agent 5, skipping' ) continue try : version = get_version_string ( check ) entries . append ( f'{get_agent_requirement_line(check, version)}\n' ) except Exception as e : echo_failure ( f'Error generating line: {e}' ) continue lines = sorted ( entries ) req_file = get_agent_release_requirements ( ) write_file_lines ( req_file , lines ) echo_success ( f'Successfully wrote to `{req_file}`!' )