Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Remove cli build steps, fix dpkg name when building on Darwin #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ function oinstall() {
}

function package() {
local target builddir prefix packages
local target builddir prefix packages arch
target="$1"
builddir="$2"
prefix="$3"
arch="$2"
builddir="$3"
prefix="$4"

cd $TOPDIR

Expand All @@ -102,19 +103,14 @@ function package() {

echo "Creating Distro full packages"
fpm -v "${RELEASE_VERSION}" --epoch 1 -f -s dir -t rpm -n orchestrator-agent -C $builddir/orchestrator-agent --prefix=/ .
fpm -v "${RELEASE_VERSION}" --epoch 1 -f -s dir -t deb -n orchestrator-agent -C $builddir/orchestrator-agent --prefix=/ --deb-no-default-config-files .
fpm -v "${RELEASE_VERSION}" --epoch 1 -f -s dir -t deb -a "$arch" -n orchestrator-agent -C $builddir/orchestrator-agent --prefix=/ --deb-no-default-config-files .

cd $TOPDIR
# rpm packaging -- executable only
echo "Creating Distro cli packages"
fpm -v "${RELEASE_VERSION}" --epoch 1 -f -s dir -t rpm -n orchestrator-agent-cli -C $builddir/orchestrator-agent-cli --prefix=/ .
fpm -v "${RELEASE_VERSION}" --epoch 1 -f -s dir -t deb -n orchestrator-agent-cli -C $builddir/orchestrator-agent-cli --prefix=/ --deb-no-default-config-files .
;;
'darwin')
echo "Creating Darwin full Package"
tar -C $builddir/orchestrator-agent -czf $TOPDIR/orchestrator-agent-"${RELEASE_VERSION}"-$target-$arch.tar.gz ./
echo "Creating Darwin cli Package"
tar -C $builddir/orchestrator-agent-cli -czf $TOPDIR/orchestrator-agent-cli-"${RELEASE_VERSION}"-$target-$arch.tar.gz ./

;;
esac

Expand Down Expand Up @@ -156,7 +152,7 @@ function main() {
build "$target" "$arch" "$builddir" "$prefix"
[[ $? == 0 ]] || return 1
if [[ $build_only -eq 0 ]]; then
package "$target" "$builddir" "$prefix"
package "$target" "$arch" "$builddir" "$prefix"
fi
}

Expand Down