Skip to content

Commit

Permalink
Merge pull request #327 from LoopPerfect/improvement/lean-bundle
Browse files Browse the repository at this point in the history
 * Reduces the size of the final bundle
  • Loading branch information
nikhedonia authored Feb 27, 2019
2 parents 947baa4 + f2acd19 commit 281b0fc
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
2 changes: 2 additions & 0 deletions buckaroo-cli/buckaroo-cli.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<TargetFramework>netcoreapp2.1</TargetFramework>
<IsPackable>false</IsPackable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<RootAllApplicationAssemblies>false</RootAllApplicationAssemblies>
<IlcGenerateCompleteTypeMetadata>false</IlcGenerateCompleteTypeMetadata>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions buckaroo/Archive.fs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ let private extractRoot (archive : IArchive) (pattern : string) =
match candidates with
| head::[] -> head
| [] ->
raise <| new Exception("No directories matched the root")
raise <| Exception ("No directories matched the root")
| xs ->
raise <| new Exception("Multiple directories match the root: " + (string xs))
raise <| Exception ("Multiple directories match the root: " + (string xs))

let extractTo (pathToArchive : string) (pathToExtraction : string) (stripPrefix : string option) = async {
use archive = Archives.Zip.ZipArchive.Open(pathToArchive) :> IArchive

let extractionOptions = new ExtractionOptions()
let extractionOptions = ExtractionOptions ()
extractionOptions.ExtractFullPath <- false
extractionOptions.Overwrite <- true

Expand Down
2 changes: 1 addition & 1 deletion buckaroo/Constants.fs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Buckaroo.Constants

[<Literal>]
let Version = "2.1.0"
let Version = "2.1.1"

[<Literal>]
let PackagesDirectory = "buckaroo"
Expand Down
1 change: 0 additions & 1 deletion buckaroo/buckaroo.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
<ItemGroup>
<PackageReference Include="FParsec" Version="1.0.3" />
<PackageReference Include="FSharp.Control.AsyncSeq" Version="2.0.21" />
<PackageReference Include="FSharp.Control.Reactive" Version="4.1.0" />
<PackageReference Include="FSharp.Data" Version="3.0.0" />
<PackageReference Include="FSharpx.Async" Version="1.13.2" />
<PackageReference Include="FSharpx.Collections" Version="1.17.0" />
Expand Down
5 changes: 3 additions & 2 deletions warp-bundle-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

export CppCompilerAndLinker=clang

wget -O warp-packer https://github.com/dgiagio/warp/releases/download/v0.3.0/linux-x64.warp-packer
wget -c -O warp-packer https://github.com/dgiagio/warp/releases/download/v0.3.0/linux-x64.warp-packer

chmod +x ./warp-packer
./warp-packer --version

dotnet publish ./buckaroo-cli/ -c Release -r linux-x64
dotnet publish ./buckaroo-cli/ -c Release -r linux-x64

mkdir -p warp
rm -rf ./warp/buckaroo-linux

./warp-packer --arch linux-x64 --exec buckaroo-cli --input_dir ./buckaroo-cli/bin/Release/netcoreapp2.1/linux-x64 --output warp/buckaroo-linux
./warp/buckaroo-linux
5 changes: 3 additions & 2 deletions warp-bundle-macos.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/bin/bash

wget -O warp-packer https://github.com/dgiagio/warp/releases/download/v0.3.0/macos-x64.warp-packer
wget -O warp-packer https://github.com/dgiagio/warp/releases/download/v0.3.0/macos-x64.warp-packer

chmod +x ./warp-packer
./warp-packer --version

dotnet publish ./buckaroo-cli/ -c Release -r osx-x64
dotnet publish ./buckaroo-cli/ -c Release -r osx-x64

mkdir -p warp
rm -rf ./warp/buckaroo-macos

./warp-packer --arch macos-x64 --exec buckaroo-cli --input_dir ./buckaroo-cli/bin/Release/netcoreapp2.1/osx-x64 --output warp/buckaroo-macos
./warp/buckaroo-macos

0 comments on commit 281b0fc

Please sign in to comment.