Skip to content

Commit

Permalink
use new footstone to make release
Browse files Browse the repository at this point in the history
  • Loading branch information
CMGS committed Jul 22, 2018
1 parent 0bfe7db commit 9277759
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 26 deletions.
19 changes: 14 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,22 @@ jobs:
- checkout
- run: make test
- run: make build
- run: ./make-rpm
- run: ./make-release
- run:
name: Create artifacts
command: |
mkdir -p /tmp/RPM
cp -r *.rpm /tmp/RPM
mkdir -p /tmp/release
cp -r eru*.rpm /tmp/release
cp -r eru*.deb /tmp/release
cp -r eru-core /tmp/release/eru-core_linux_x86_64
cp -r core.yaml.sample /tmp/release
cp -r eru-core.service /tmp/release
- run:
name: Check files
command: |
rpm -qlp eru*.rpm
dpkg -c eru*.deb
- store_artifacts:
path: /tmp/RPM
destination: RPM
path: /tmp/release
destination: Release

48 changes: 48 additions & 0 deletions make-release
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/sh

ROOT="`pwd`/build"
mkdir -p $ROOT

after_install_script="$ROOT/after_install.sh"
RPMROOT="$ROOT/rpmbuild"
DEBROOT="$ROOT/debbuild"

cat > $after_install_script << EOF
systemctl daemon-reload
EOF

VERSION=$(cat VERSION)

BIN="$RPMROOT/usr/bin"
CONF="$RPMROOT/etc/eru"
SERVICE="$RPMROOT/usr/lib/systemd/system"

mkdir -p $BIN
mkdir -p $CONF
mkdir -p $SERVICE

cp eru-core $BIN
cp core.yaml.sample $CONF
cp eru-core.service $SERVICE

echo $VERSION rpm build begin

fpm -f -s dir -t rpm -n eru-core --epoch 0 -v $VERSION --iteration 1.el7 -C $RPMROOT -p $PWD --verbose --rpm-auto-add-directories --category 'Development/App' --description 'docker eru core' --after-install $after_install_script --url 'https://github.com/projecteru2/core' --license 'MIT' --no-rpm-sign usr etc

BIN="$DEBROOT/usr/bin"
CONF="$DEBROOT/etc/eru"
SERVICE="$DEBROOT/lib/systemd/system"

mkdir -p $BIN
mkdir -p $CONF
mkdir -p $SERVICE

cp eru-core $BIN
cp core.yaml.sample $CONF
cp eru-core.service $SERVICE

echo $VERSION deb build begin

fpm -f -s dir -t deb -n eru-core -v $VERSION --iteration 1.noarch -C $DEBROOT -p $PWD --verbose --category 'Development/App' --description 'docker eru core' --url 'https://github.com/projecteru2/core' --license 'MIT' --after-install $after_install_script --deb-no-default-config-files usr etc lib

rm -rf $ROOT
21 changes: 0 additions & 21 deletions make-rpm

This file was deleted.

0 comments on commit 9277759

Please sign in to comment.