Skip to content

Commit

Permalink
Merge pull request #4 from s1cyan/brewing
Browse files Browse the repository at this point in the history
adds the script for tarballs for deb/rpm from appsody
  • Loading branch information
s1cyan authored Sep 30, 2019
2 parents c4bc3b4 + 8ec5f09 commit 4e0114d
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 105 deletions.
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,21 +103,21 @@ tar-windows: build-windows ## Build the windows binary and package it in a .tar
.PHONY: brew-darwin
brew-darwin: build-darwin ## Build the OSX binary and package it for OSX brew install
# brew script goes here
# cp -p $(BUILD_PATH)/$(build_binary) $(package_binary)
# homebrew-build/build-darwin.sh $(PACKAGE_PATH) $(package_binary) $(CONTROLLER_BASE_URL) $(VERSION)
# rm -f $(package_binary)
cp -p $(BUILD_PATH)/$(build_binary) $(package_binary)
homebrew-build/build-darwin.sh $(PACKAGE_PATH) $(package_binary) $(CONTROLLER_BASE_URL) $(VERSION)
rm -f $(package_binary)
.PHONY: deb-linux
deb-linux: build-linux ## Build the linux binary and package it as a .deb for Debian apt-get install
# deb script goes here
# cp -p $(BUILD_PATH)/$(build_binary) $(package_binary)
# deb-build/build-deb.sh $(package_binary) $(DOCKER_IMAGE_DEB) $(PACKAGE_PATH) $(CONTROLLER_BASE_URL) $(VERSION)
# rm -f $(package_binary)
cp -p $(BUILD_PATH)/$(build_binary) $(package_binary)
deb-build/build-deb.sh $(package_binary) $(DOCKER_IMAGE_DEB) $(PACKAGE_PATH) $(CONTROLLER_BASE_URL) $(VERSION)
rm -f $(package_binary)
.PHONY: rpm-linux
rpm-linux: build-linux ## Build the linux binary and package it as a .rpm for RedHat yum install
# rpm script goes here
# cp -p $(BUILD_PATH)/$(build_binary) $(package_binary)
# rpm-build/build-rpm.sh $(package_binary) $(DOCKER_IMAGE_RPM) $(PACKAGE_PATH) $(CONTROLLER_BASE_URL) $(VERSION)
# rm -f $(package_binary)
cp -p $(BUILD_PATH)/$(build_binary) $(package_binary)
rpm-build/build-rpm.sh $(package_binary) $(DOCKER_IMAGE_RPM) $(PACKAGE_PATH) $(CONTROLLER_BASE_URL) $(VERSION)
rm -f $(package_binary)

.PHONY: deploy
deploy: ## Publishes the formula
Expand Down
11 changes: 11 additions & 0 deletions deb-build/build-deb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -e
cd $(dirname "$0")
cp ../$1 ./$1.static
tar -cvf appsody-deb.tar ./debian
docker run -it -v $PWD:/input -v $PWD:/output -e CMD_NAME=$1 \
-e VERSION=$5 -e CONTROLLER_BASE_URL=$4 $2
mv *.deb $3/
rm $1.static
rm *.tar
cd -
1 change: 0 additions & 1 deletion deb-build/debian/appsody.install

This file was deleted.

48 changes: 0 additions & 48 deletions deb-build/debian/appsody.postinst

This file was deleted.

39 changes: 0 additions & 39 deletions deb-build/debian/appsody.postrm

This file was deleted.

2 changes: 0 additions & 2 deletions deb-build/debian/appsody.substvars

This file was deleted.

5 changes: 0 additions & 5 deletions deb-build/debian/changelog

This file was deleted.

1 change: 0 additions & 1 deletion deb-build/debian/compat

This file was deleted.

23 changes: 23 additions & 0 deletions rpm-build/build-rpm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
set -e
VERSION=$5
cd $(dirname "$0")
cp ../$1 .
cp rpm-appsody.spec.tpl rpm-$1.spec
if [[ "$OSTYPE" == "darwin"* ]]; then
echo "FOR LOCAL DEBUG ONLY..."
sed -i "" "s/PACKAGE_NAME/$1/g" rpm-$1.spec
sed -i "" "s/PACKAGE_VERSION/$VERSION/g" rpm-$1.spec
sed -i "" "s+CONTROLLER_BASE_URL+$4+g" rpm-$1.spec
else
echo "Travis only..."
sed -i "s/PACKAGE_NAME/$1/g" rpm-$1.spec
sed -i "s/PACKAGE_VERSION/$VERSION/g" rpm-$1.spec
sed -i "s+CONTROLLER_BASE_URL+$4+g" rpm-$1.spec
fi
docker run -v $PWD:/sources -v $PWD:/output:Z $2:centos-7
# Get rid of the source RPM package
rm -f $1*.src.rpm
mv $1*.rpm $3/
rm -f $1 rpm-$1.spec
cd -

0 comments on commit 4e0114d

Please sign in to comment.