Date: Tue, 4 Sep 2018 07:26:03 +0000 (UTC) From: Tobias Kortkamp <tobik@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r478931 - head/Mk/Uses Message-ID: <201809040726.w847Q3pi003839@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tobik Date: Tue Sep 4 07:26:02 2018 New Revision: 478931 URL: https://svnweb.freebsd.org/changeset/ports/478931 Log: Mk/Uses/cargo.mk: Let 'cargo-crates' generate Cargo.lock if it does not exist This will make maintaining ports easier when upstream does not provide a Cargo.lock on its own. It uses the crate registry and will output the newest crate versions available based on the restrictions in Cargo.toml. As such subsequent runs of `make cargo-crates` might not generate the same output. Upstream should still be encouraged to provide Cargo.lock if possible. Requested by: mat Differential Revision: https://reviews.freebsd.org/D17003 Modified: head/Mk/Uses/cargo.mk Modified: head/Mk/Uses/cargo.mk ============================================================================== --- head/Mk/Uses/cargo.mk Tue Sep 4 06:54:09 2018 (r478930) +++ head/Mk/Uses/cargo.mk Tue Sep 4 07:26:02 2018 (r478931) @@ -253,8 +253,15 @@ do-test: # Helper targets for port maintainers # -# cargo-crates will output the crates list from Cargo.lock. +# cargo-crates will output the crates list from Cargo.lock. If there +# is no Cargo.lock for some reason, try and generate it first. cargo-crates: extract + @if [ ! -r "${CARGO_CARGOLOCK}" ]; then \ + ${ECHO_MSG} "===> ${CARGO_CARGOLOCK} not found. Trying to generate it..."; \ + ${CARGO_CARGO_RUN} generate-lockfile \ + --manifest-path ${CARGO_CARGOTOML} \ + --verbose; \ + fi @${SETENV} USE_GITHUB=${USE_GITHUB} \ ${AWK} -f ${SCRIPTSDIR}/cargo-crates.awk ${CARGO_CARGOLOCK}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809040726.w847Q3pi003839>