Open alizainc opened 3 weeks ago
Hello @alizainc! Thank you for reaching out!
You're right. The reason is that the package doesn't contain a LICENSE
file at the root.
Aside from the adding the license manually, I would actually recommend that you file an issue or create a PR for that package to add the license file.
Btw, I think you linked a fork of Thrift-Swift
. The original package seems to be here: https://github.com/apocolipse/Thrift-Swift
There are several method to do it manually, depending on how you use AckGen.
You could
add the information as another entry to the Acknowledgements.plist
after it's created by AckGen.
use the otherAcknowledgements
parameter of AcknowledgementsList
AcknowledgementsList(
otherAcknowledgements: [
.init(
title: "Thrift-Swift",
license: "Licensed to the Apache Software Foundation (ASF) under..."
)
]
)
Please let me know if this doesn't help!
Cheers, Martin
To solve this for font awesome, I create my own dummy package and added their policy etc.
Thank you @MartinP7r for the quick response. I have updated our project to use the original package by apocolipse
, but it seems like even that package does not have a LICENSE file. I have create an issue to the project to create a LICENSE file, instead of adding the LICENSE in readme.
For the first solution you provided, if I just add another entry in the Acknowledgements.plist
wouldn't it be overwritten when we re-run the build for the package? Or will it be able to somehow handle that and keep the extra added entry? Thanks.
For the first solution you provided, if I just add another entry in the Acknowledgements.plist wouldn't it be overwritten when we re-run the build for the package? Or will it be able to somehow handle that and keep the extra added entry?
You're right. This would be overwritten every time you run ackgen
. For example in your run script, if you followed the normal installation instructions. If you have the plist generated automatically, it would make sense to add other licenses also automatically.
The 2.
option (adding an Acknowledgement
manually in code is maybe easiest to implement. Especially if you don't have many licenses that need adding manually.
But for completeness, one approach you could take is to have the additional license's information in a separate plist and merge that after running swift run ackgen
in your build script (PlistBuddy should be able to do that).
swift run ackgen
I haven't tried it myself, but something like below might work (would need to set correct paths)
DIR=$PROJECT_TEMP_DIR/../../../SourcePackages/checkouts/AckGen
if [ -d "$DIR" ]; then
cd $DIR
SDKROOT=(xcrun --sdk macosx --show-sdk-path)
swift run ackgen
/usr/libexec/PlistBuddy -x -c "Merge /path/to/OtherLicense.plist" /path/to/Acknowledgements.plist
fi
AckGen is unable to generate the License details for https://github.com/cozality/Thrift-Swift package. I guess the reason is because it does not have a
LICENSE
file in it, but rather the license is in readme and in comments of Package.swift. How can I manually add the license details for this package if AckGen cannot pull it from the SPM resolve file.