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

Max Howell max.howell at apple.com
Thu Jan 7 13:27:45 CST 2016


Ensure there are no uncommitted changes and then tag a new version in each local repository.

> On Jan 6, 2016, at 11:03 PM, qibo_cn--- via swift-users <swift-users at swift.org> wrote:
> 
> 
> thank you very much.
> when i excu "swift build"in deckofplayingcard.
> error:the dependency graph could not be satisfied(somedir/fisheryates).did i miss something?
> 
> Best
> Bob
> 
>> 发件人: Ankit Agarwal
>> 已发送: 1 月 7 日 星期四 下午 1:51
>> 主题: Re: [swift-dev] how to write package.swift if i want to use dependency file in local?
>> 收件人: qibo_cn at outlook.com
>> 抄送: swift-dev at swift.org, swift-users at swift.org
>> 
>> 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` <https://github.com/apple/example-package-fisheryates.git`> to `../FisherYates`
>> 
>> ` https://github.com/apple/example-package-playingcard.git` <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 <mailto: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 <mailto:swift-dev at swift.org> 
>> https://lists.swift.org/mailman/listinfo/swift-dev <https://lists.swift.org/mailman/listinfo/swift-dev> 
>> 
>> 
>> --
>> 
>> Ankit 
>> 
>> 
>  _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160107/8fd31f82/attachment.html>


More information about the swift-users mailing list