mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Include tag instead of version in Package.swift
This commit is contained in:
1 parent
27448add37
commit
75dfdd8279
1 file changed
+4
-1
@@ -52,6 +52,8 @@ if [ "$ACTION" = "" ] ; then
|
||||
cd "$CONFIGURATION_BUILD_DIR/staging-spm"
|
||||
#rm -rf "$CONFIGURATION_BUILD_DIR/Sparkle.xcarchive"
|
||||
zip -rqyX -9 "../Sparkle-for-Swift-Package-Manager.zip" *
|
||||
# Get latest git tag
|
||||
latest_git_tag=$(git describe --abbrev=0)
|
||||
# Generate new Package manifest
|
||||
cd "$CONFIGURATION_BUILD_DIR"
|
||||
cp "$SRCROOT/Package.swift" "$CONFIGURATION_BUILD_DIR"
|
||||
@@ -59,10 +61,11 @@ if [ "$ACTION" = "" ] ; then
|
||||
# is equivalent to shasum -a 256 FILE
|
||||
spm_checksum=$(swift package compute-checksum "Sparkle-for-Swift-Package-Manager.zip")
|
||||
rm -rf ".build"
|
||||
sed -E -i '' -e "/let version/ s/[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+/$CURRENT_PROJECT_VERSION/" -e "/let checksum/ s/[[:xdigit:]]{64}/$spm_checksum/" "Package.swift"
|
||||
sed -E -i '' -e '/let tag/ s/".+"/"$latest_git_tag"/' -e '/let version/ s/".+"/"$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"
|
||||
echo "Tag: $latest_git_tag"
|
||||
echo "Checksum: $spm_checksum"
|
||||
else
|
||||
echo "warning: Xcode version $XCODE_VERSION_ACTUAL does not support computing checksums for Swift Packages. Please update the Package manifest manually."
|
||||
|
||||
Reference in new issue
Block a user