Skip to content

Commit e80781d

Browse files
authored
Merge pull request #4190 from hesxenon/patch-1
Update git-dependencies.md
2 parents cc14492 + 3292bb8 commit e80781d

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

docs/content/git-dependencies.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,14 @@ git https://uri/to/repo.git master build: "powershell build.ps1", OS: windows
7171

7272
## Using Git repositories as NuGet source
7373

74+
### With pre-built, checked-in nupgks
75+
7476
If you have NuGet packages inside a git repository you can easily use the
7577
repository as a NuGet source from the [`paket.dependencies`
7678
file](dependencies-file.html):
7779

7880
```paket
79-
git https://github.com/forki/nupkgtest.git master Packages: /source/
81+
git https://github.com/forki/nupkgtest.git master Packages: /bin/
8082
8183
nuget Argu
8284
```
@@ -85,16 +87,28 @@ The generated [`paket.lock` file](lock-file.html) will look like this:
8587

8688
```paket
8789
NUGET
88-
remote: paket-files/github.com/forki/nupkgtest/source
90+
remote: paket-files/github.com/forki/nupkgtest/bin
8991
Argu (1.1.3)
9092
GIT
9193
remote: https://github.com/forki/nupkgtest.git
9294
(05366e390e7552a569f3f328a0f3094249f3b93b)
9395
```
9496

97+
### Building nupkg on install
98+
9599
It's also possible to
96100
[run build scripts](git-dependencies.html#Running-a-build-in-git-repositories)
97-
to create the NuGet packages:
101+
to create the NuGet packages when installing/restoring with paket:
102+
103+
```paket
104+
git https://github.com/forki/nupkgtest.git master build: "dotnet pack", Packages: /bin/Debug
105+
106+
nuget Argu
107+
```
108+
109+
NOTE: this assumes that the name of the package is `Argu` which can't be inferred in this case since no `*.fsproj` or `.sln` file is present in the example repository
110+
111+
### Arbitrary build scripts
98112

99113
```paket
100114
git https://github.com/forki/nupkgtest.git master build: "build.cmd", Packages: /source/, OS: windows
@@ -103,4 +117,8 @@ git https://github.com/forki/nupkgtest.git master build: "build.sh", Packages: /
103117
nuget Argu
104118
```
105119

106-
In this sample we have different build scripts for Mono and Windows.
120+
In this sample we have different build scripts for Mono and Windows. Both of the specified scripts simply copy the prebuilt nupkgs from `/bin` to `/source`
121+
122+
### Actually using the package
123+
124+
Don't forget to also add your dependency to the `paket.references` file.

0 commit comments

Comments
 (0)