def build_distribution(): """Build the rubygem.""" current_dependency = rm.extract_assignment(CARGO_FILE, "conjecture") assert current_dependency == LOCAL_PATH_DEPENDENCY, ( "Cargo file in a bad state. Expected conjecture dependency to be " f"{LOCAL_PATH_DEPENDENCY} but it was instead {current_dependency}") conjecture_version = cr.current_version() # Update to use latest version of conjecture-rust. try: update_conjecture_dependency(repr(conjecture_version)) rake_task("gem") finally: update_conjecture_dependency(LOCAL_PATH_DEPENDENCY)
def build_distribution(): """Build the rubygem.""" current_dependency = rm.extract_assignment(CARGO_FILE, 'conjecture') assert current_dependency == LOCAL_PATH_DEPENDENCY, ( 'Cargo file in a bad state. Expected conjecture dependency to be %s ' 'but it was instead %s' ) % (LOCAL_PATH_DEPENDENCY, current_dependency) conjecture_version = cr.current_version() # Update to use latest version of conjecture-rust. try: update_conjecture_dependency(repr(conjecture_version)) rake_task('gem') finally: update_conjecture_dependency(LOCAL_PATH_DEPENDENCY)
def current_version(): """Returns the current version as specified by the Cargo.toml.""" return unquote_string(rm.extract_assignment(CARGO_FILE, "version"))