RFC: let `paket pack` generate a `paket.local` snippet
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
Use Case
It becomes cumbersome to create/maintain paket.local for testing new features when
a) many packages are involved (as in large-scale software projects), and
b) version numbers changes often (as in continuous deployment scenarios, especially when using GitVersion or similar)
Proposal
Provide an additional parameter for paket pack, e.g. --generate-paket-local, to create a paket.local file that references the nuget packages just build.
The file could be generated per default in the output directory and/or the new parameter provides the target file (i.e. --generate-paket-local=/some/dir/paket.local.inc).
Known workarounds
Right now we use some bash/sed magic to convert the paket pack-output into a paket.local snippet, i.e. piping into this bash function:
PAKET_LOCAL="nugets/paket.local.inc"
function extend_paket_local {
while read -r line; do
line="${line%"${line##*[![:space:]]}"}" # remove trailing whitespace
echo -E "$line"
if [[ "${line}" == 'Wrote: '* ]] && [[ "${line}" == *'.nupkg' ]]; then
echo -E "${line}" | sed -r '
s/^Wrote: (.*)\\([^\]+)\.([0-9]+\.[0-9]+\.[0-9]+(-[a-z][-a-z0-9]+)?)\.nupkg$/nuget \2 -> source "\1" version \3/
' >> "$PAKET_LOCAL"
fi
done
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the paket pack command implementation and its handling of written .nupkg files. Review the existing paket.local syntax and determine how the proposed option and output path should behave; done means generated output contains valid package references for the packages just built.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100