mirror of
https://github.com/fosskers/cargo-aur.git
synced 2026-03-08 23:03:13 -05:00
[PR #30] Support 'from source' packaging, and using crates.io as a source #32
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fosskers/cargo-aur/pull/30
Author: @nick42d
Created: 8/17/2024
Status: 🔄 Open
Base:
master← Head:iss28-cratesio📝 Commits (10+)
4f9dd8dAdd new commandline flags, add function to download cratee582c04Added workflow for building a crate, and tests up to tarballf9bb8fbFix broken tarball function8a12e50Implement the 3 new build typesa6ad38eAdd PKGBUILD for crates-io no-bin0a8d8f2Remove warning, bump version93c60a3Implement PKGBUILD for no-bin, source type projectcd55dcaRemove derives that were not requiredcceeda0Fix typo4b595bcFix for not using target/release directory for from source pkgbuilds📊 Changes
5 files changed (+461 additions, -34 deletions)
View changed files
📝
Cargo.toml(+2 -1)➕
src/crates.rs(+268 -0)📝
src/error.rs(+27 -0)📝
src/lib.rs(+12 -6)📝
src/main.rs(+152 -27)📄 Description
Added new flags
--no-binand--source.Existing behaviour is
--source project.New options
--source crates-io --no-binDownload crate from crates.io, get it's checksum, and write a PKGBUILD that downloads and builds from crates.io. No tarball is produced.
Example PKGBUILD
https://gist.github.com/nick42d/6ce7809a0b24444aaccf9655811cb750
--source crates-ioDownload crate from crates.io, and create a binary release tarball in
target/cargo-aur. Write a PKGBUILD that assumes user will upload binary release tarball to github/gitlabExample PKGBUILD
https://gist.github.com/nick42d/dfe9e652473370671fecae9bce2d84fd
--source project --no-binPackage the source code of the project to a source tarball in
target/cargo-aur. Write a PKGBUILD that assumes user will upload source tarball to github/gitlabExample PKGBUILD
https://gist.github.com/nick42d/e441adb325c01cbbee68c835bfe58e3b
This change should be non-breaking as
--sourcedefaults toprojectso I put this as a minor version bump. However, you could consider a major version bump due to the new functionality.Testing note: the version number in Cargo.toml is used to download the .crate. If you try and run
--source crates.iowithversion = "1.7.2"this will fail since 1.7.2 isn't uploaded to crates.io yet. Change version to 1.7.1 to test the new flags.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.