-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate building the docker image from generating fclones packages. Run packaging as local user. Add musl and rpm packages.
- Loading branch information
Showing
6 changed files
with
54 additions
and
43 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,5 @@ | ||
#!/bin/sh | ||
|
||
# Builds a docker image used for generating various fclones packages | ||
IMAGE="pkolaczk/fclones-builder" | ||
docker build -t $IMAGE $(realpath "$(dirname $0)") |
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,36 @@ | ||
#!/bin/bash | ||
set -e | ||
bold=$(tput bold) | ||
normal=$(tput sgr0) | ||
|
||
# This script generates packages for a release and places them in target/packages/<version>. | ||
# Don't use it directly, use package.sh instead. | ||
|
||
cd "$(dirname $0)/.." | ||
|
||
echo "${bold}Building${normal}" | ||
set -x | ||
cargo build --release | ||
cargo build --release --target i686-unknown-linux-musl | ||
cargo build --release --target x86_64-unknown-linux-musl | ||
cargo build --release --target x86_64-pc-windows-gnu | ||
set +x | ||
|
||
echo "${bold}Packaging${normal}" | ||
set -x | ||
VERSION=$(cargo pkgid | sed 's/.*#//') | ||
PKG_DIR=target/packages/$VERSION | ||
mkdir -p $PKG_DIR | ||
rm -f $PKG_DIR/* | ||
|
||
cargo deb | ||
mv target/debian/*.deb $PKG_DIR | ||
|
||
fakeroot alien --to-rpm -c $PKG_DIR/*.deb | ||
mv *.rpm $PKG_DIR | ||
fakeroot alien --to-tgz -c $PKG_DIR/*.deb | ||
mv *.tgz $PKG_DIR/"fclones-$VERSION-linux-glibc-x86_64.tar.gz" | ||
|
||
tar -zcvf $PKG_DIR/"fclones-$VERSION-linux-musl-x86_64.tar.gz" target/x86_64-unknown-linux-musl/release/fclones | ||
tar -zcvf $PKG_DIR/"fclones-$VERSION-linux-musl-i686.tar.gz" target/i686-unknown-linux-musl/release/fclones | ||
zip -j $PKG_DIR/"fclones-$VERSION-windows-x86_64.zip" target/x86_64-pc-windows-gnu/release/fclones.exe |
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