[swift-dev] how to write package.swift if i want to use dependency file in local?

Ankit Agarwal ankit at ankit.im
Wed Jan 6 23:51:11 CST 2016


I am assuming by downloaded you meant Downloaded the zip from github.

Suppose you have all three downloaded side by side

some-dir
├── PlayingCard
├── FisherYates
└── DeckOfPlayingCards

since you downloaded as a zip and not cloned these directories will not be
under git version control anymore.
place PlayCard and FisherYates under git and add tag to them as they are
dependencies to DeckOfPlayingCards.
DeckOfPlayingCards need not be under git to be built.

$ cd PlayingCard
$ git init && git add . && git commit -m "init" && git tag 1.0.0

$ cd ../FisherYates
$ git init && git add . && git commit -m "init" && git tag 1.0.0

$ cd ../DeckOfPlayingCards

edit Package.swift and change

`https://github.com/apple/example-package-fisheryates.git` to
`../FisherYates`
`https://github.com/apple/example-package-playingcard.git` to `../PlayingCar

$ swift build

done.


PS: This should be in swift-users or swift-build-dev


On Thu, Jan 7, 2016 at 9:58 AM, qibo_cn--- via swift-dev <
swift-dev at swift.org> wrote:

> hi all
>   i want to build dealer project in swift package-manager.because my
> ubuntu is not supported to connect github.so i dowload
> playingcard,fisheryates,deckofplaycards projects in local.build playingcatd
> and fisheryates successfully. how i shuold change the package.swift in
> deckofplaycards, to duild this project.
>
> Best
> Bob
>
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev
>
>


-- 
Ankit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160107/a3c19c86/attachment.html>


More information about the swift-dev mailing list