Ejemplo n.º 1
0
def run_hashing() -> None:
    """Run the hashing script."""
    hashing_call = update_hashes()
    if hashing_call == 1:
        print("Problem when running IPFS script!")
        sys.exit(1)
Ejemplo n.º 2
0
        "--new-version", type=str, required=True, help="The new version."
    )
    parser.add_argument("--no-fingerprint", action="store_true")
    arguments_ = parser.parse_args()
    return arguments_


if __name__ == "__main__":
    arguments = parse_args()
    _new_version_str = arguments.new_version

    _current_version_str = update_version_for_aea(_new_version_str)
    update_version_for_files(_current_version_str, _new_version_str)

    _new_version: Version = Version(_new_version_str)
    _current_version: Version = Version(_current_version_str)
    have_updated_specifier_set = update_aea_version_specifiers(
        _current_version, _new_version
    )

    print("OK")
    return_code = 0
    if arguments.no_fingerprint:
        print("Not updating fingerprints, since --no-fingerprint was specified.")
    elif not have_updated_specifier_set:
        print("Not updating fingerprints, since no specifier set has been updated.")
    else:
        print("Updating hashes and fingerprints.")
        return_code = update_hashes()
    sys.exit(return_code)