Skip to content

Commit 487d2d6

Browse files
committed
feat: Prevent sources from being installed in slug
1 parent d5cd857 commit 487d2d6

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

bin/compile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ source "$BIN_DIR/steps/hooks/pre_compile"
3434
source "$BIN_DIR/steps/swift-build"
3535
source "$BIN_DIR/steps/swift-install"
3636
source "$BIN_DIR/steps/libatomic-install"
37+
source "$BIN_DIR/steps/slug-cleanup"
3738

3839
# Setup application environment
3940
mkdir -p $BUILD_DIR/.profile.d

bin/steps/slug-cleanup

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Remove unnnessecary files from being included in the slug
2+
3+
remove() {
4+
if [ -r "$1" ]; then
5+
rm -fr "$1"
6+
fi
7+
}
8+
9+
remove "$BUILD_DIR/Package.swift"
10+
remove "$BUILD_DIR/Package.resolved"
11+
remove "$BUILD_DIR/Sources"
12+
remove "$BUILD_DIR/Tests"

0 commit comments

Comments
 (0)