mirror of
https://github.com/nicklockwood/SwiftFormat.git
synced 2026-05-17 10:30:35 +00:00
Update artifact bundle script to include Linux
This commit is contained in:
+4
@@ -8,6 +8,10 @@
|
||||
{
|
||||
"path": "swiftformat-__VERSION__-macos/bin/swiftformat",
|
||||
"supportedTriples": ["x86_64-apple-macosx", "arm64-apple-macosx"]
|
||||
},
|
||||
{
|
||||
"path": "swiftformat-__VERSION__-linux-gnu/bin/swiftformat_linux",
|
||||
"supportedTriples": ["x86_64-unknown-linux-gnu"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -3,9 +3,10 @@
|
||||
set -e
|
||||
|
||||
ARTIFACT_BUNDLE=swiftformat.artifactbundle
|
||||
INFO_TEMPLATE=Scripts/spm-macos-artifact-bundle-info.template
|
||||
INFO_TEMPLATE=Scripts/spm-artifact-bundle-info.template
|
||||
VERSION=$(./Scripts/get-version.sh)
|
||||
BINARY_OUTPUT_DIR=$ARTIFACT_BUNDLE/swiftformat-$VERSION-macos/bin
|
||||
MAC_BINARY_OUTPUT_DIR=$ARTIFACT_BUNDLE/swiftformat-$VERSION-macos/bin
|
||||
LINUX_BINARY_OUTPUT_DIR=$ARTIFACT_BUNDLE/swiftformat-$VERSION-linux-gnu/bin
|
||||
|
||||
mkdir $ARTIFACT_BUNDLE
|
||||
|
||||
@@ -15,9 +16,13 @@ cp LICENSE.md $ARTIFACT_BUNDLE
|
||||
# Create bundle info.json from template, replacing version
|
||||
sed 's/__VERSION__/'"${VERSION}"'/g' $INFO_TEMPLATE > "${ARTIFACT_BUNDLE}/info.json"
|
||||
|
||||
# Copy MacOS SwiftFormat binary into bundle
|
||||
mkdir -p $BINARY_OUTPUT_DIR
|
||||
cp CommandLineTool/swiftformat $BINARY_OUTPUT_DIR
|
||||
# Copy macOS SwiftFormat binary into bundle
|
||||
mkdir -p $MAC_BINARY_OUTPUT_DIR
|
||||
cp CommandLineTool/swiftformat $MAC_BINARY_OUTPUT_DIR
|
||||
|
||||
# Copy Linux SwiftFormat binary into bundle
|
||||
mkdir -p $LINUX_BINARY_OUTPUT_DIR
|
||||
cp CommandLineTool/swiftformat_linux $LINUX_BINARY_OUTPUT_DIR
|
||||
|
||||
# Create ZIP
|
||||
zip -yr - $ARTIFACT_BUNDLE > "${ARTIFACT_BUNDLE}.zip"
|
||||
|
||||
Reference in New Issue
Block a user