-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild-github
More file actions
executable file
·68 lines (55 loc) · 2.01 KB
/
build-github
File metadata and controls
executable file
·68 lines (55 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
# -*- mode: sh; -*-
set -ex
if ! test -e bootstrap; then
if ! test -d openbedrock; then
git clone https://github.com/rlauer6/openbedrock.git
fi
cd openbedrock
workdir=$(pwd)
if test -n "$1"; then
git checkout "$1"
fi
else
workdir=$(pwd)
fi
echo $workdir
########################################################################
# makes all and builds CPAN distribution tar ball
########################################################################
./bootstrap && ./configure && make
########################################################################
# run tag tests
########################################################################
cd src/main/perl
make test
########################################################################
# run lib tests
########################################################################
cd $workdir
cd src/main/perl/lib
make test
########################################################################
# run build to create rpms and distribution tarball
########################################################################
cd $workdir
make dist
rpmbuild -tb *.tar.gz
########################################################################
# create a CPAN distribution tarball for `Bedrock::Lite`
########################################################################
cd $workdir
cd cpan/bedrock-core
make cpan
########################################################################
# check for tarbar, CPAN distribution, rpm files
########################################################################
cd $workdir
tarball=$(ls -1t bedrock*.tar.gz | head -1)
test -n $tarball && test -f $tarball || false
cpandist=$(ls -1t cpan/Bedrock*.tar.gz | head -1)
test -n $cpandist && test -f $cpandist || false
cpandist=$(ls -1t cpan/bedrock-core/Bedrock-Core-*.tar.gz | head -1)
test -n $cpandist && test -f $cpandist || false
rpm=$(ls -1t $HOME/rpmbuild/RPMS/noarch/bedrock-core*rpm | head -1)
test -n $rpm && test -f $rpm || false