mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Removing the need for Package-template
This commit is contained in:
1 parent
c7f1a75f95
commit
dd12653c29
3 files changed
+3
-29
No files matched your search
@@ -54,13 +54,11 @@ if [ "$ACTION" = "" ] ; then
|
||||
zip -rqyX -9 "../Sparkle-SPM-$CURRENT_PROJECT_VERSION.zip" *
|
||||
# Generate new Package manifest
|
||||
cd "$CONFIGURATION_BUILD_DIR"
|
||||
cp "$SRCROOT/Package-template.swift" "$CONFIGURATION_BUILD_DIR"
|
||||
mv "Package-template.swift" "Package.swift"
|
||||
cp "$SRCROOT/Package.swift" "$CONFIGURATION_BUILD_DIR"
|
||||
# is equivalent to shasum -a 256 FILE
|
||||
spm_checksum=$(swift package compute-checksum "Sparkle-SPM-$CURRENT_PROJECT_VERSION.zip")
|
||||
rm -rf ".build"
|
||||
sed -i '' -e "s/VERSION_PLACEHOLDER/$CURRENT_PROJECT_VERSION/g" "Package.swift"
|
||||
sed -i '' -e "s/CHECKSUM_PLACEHOLDER/$spm_checksum/g" "Package.swift"
|
||||
sed -E -i '' -e "/let version/ s/[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+/$CURRENT_PROJECT_VERSION/" -e "/let checksum/ s/[[:xdigit:]]{64}/$spm_checksum/" "Package.swift"
|
||||
cp "Package.swift" "$SRCROOT"
|
||||
echo "Package.swift updated with the following values:"
|
||||
echo "Version: $CURRENT_PROJECT_VERSION"
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
// swift-tools-version:5.3
|
||||
import PackageDescription
|
||||
|
||||
let version = "VERSION_PLACEHOLDER"
|
||||
let checksum = "CHECKSUM_PLACEHOLDER"
|
||||
let url = "https://github.com/sparkle-project/Sparkle/releases/download/\(version)/Sparkle-SPM-\(version).zip"
|
||||
|
||||
let package = Package(
|
||||
name: "Sparkle",
|
||||
platforms: [.macOS(.v10_11)],
|
||||
products: [
|
||||
.library(
|
||||
name: "Sparkle",
|
||||
targets: ["Sparkle"])
|
||||
],
|
||||
targets: [
|
||||
.binaryTarget(
|
||||
name: "Sparkle",
|
||||
url: url,
|
||||
checksum: checksum
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
import PackageDescription
|
||||
|
||||
let version = "1.24.0"
|
||||
let checksum = "47e985f48abc1470673db2dca0c0b6ded5dfa80fa32a1b33bc014cc310f75c1a"
|
||||
let checksum = "099ae1e045e254fbf803f98ff74607123bbd288c4f17725e19be5704b8039ef4"
|
||||
let url = "https://github.com/sparkle-project/Sparkle/releases/download/\(version)/Sparkle-SPM-\(version).zip"
|
||||
|
||||
let package = Package(
|
||||
|
||||
Reference in new issue
Block a user