This repository has been archived by the owner on Mar 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
47 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env bash | ||
|
||
# javapackager in Java 8 is an awful, awful program ... so buggy. Well use it anyway to put together a basic | ||
# image, albeit with workarounds. Then well modify that image to use the bootstrapper, then tarball it. | ||
|
||
set -e | ||
|
||
v=$( ./gradlew -q printVersion ) | ||
export GRAVITON_VERSION=$v | ||
|
||
echo "Building Linux package for Graviton $v" | ||
echo | ||
|
||
./gradlew copyBootstrapToLibs | ||
bundles=build/packaged/bundles | ||
srcfiles=$( ls build/install/graviton/lib ) | ||
# The -outfile flag doesn't seem to actually be used, instead name is combined with | ||
# version to produce the output file name, but it has to be specified anyway. | ||
# | ||
# We can't pass -srcfiles "$srcfiles" in the obvious and correct way because I get | ||
# an out of memory error regardless of what heap size I use. Not sure why but I'll | ||
# copy the files manually afterwards. | ||
rm -rf $bundles || true | ||
javapackager -deploy -nosign -native image -outdir build/packaged/ -outfile graviton-$GRAVITON_VERSION -name graviton -appclass app.graviton.shell.Graviton -srcdir build/install/graviton/lib -Bidentifier=app.graviton.browser -BmainJar=graviton-$GRAVITON_VERSION.jar -BappVersion=$GRAVITON_VERSION -Bcategory=Network -Bemail=mike@plan99.net -Bcopyright=Graviton -BlicenseType=Apache-2.0 -BlicenseFile=build/install/graviton/lib/LICENSE -v | ||
for f in $srcfiles; do | ||
cp build/install/graviton/lib/$f $bundles/graviton/app/$f | ||
done | ||
|
||
[[ -d /tmp/graviton-image ]] && rm -rf /tmp/graviton-image | ||
mv $bundles/graviton /tmp/graviton-image | ||
mkdir $bundles/graviton | ||
mv /tmp/graviton-image $bundles/graviton/$GRAVITON_VERSION | ||
mv $bundles/graviton/$GRAVITON_VERSION/app/bootstrap.kexe $bundles/graviton/graviton | ||
tar czvf $bundles/graviton.tar.gz $bundles/graviton |