File: package-release.sh

package info (click to toggle)
spatialindex 1.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 6,272 kB
  • sloc: cpp: 65,051; python: 2,895; sh: 1,952; ansic: 579; makefile: 485
file content (76 lines) | stat: -rwxr-xr-x 1,572 bytes parent folder | download
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
69
70
71
72
73
74
75
76
#!/bin/bash


# Build PDAL package
# ./package.sh


GITSHA="$(git rev-parse HEAD)"
VERSIONTAG="$(git describe --exact-match --tags $(git log -n1 --pretty='%h'))"

echo "Cutting release for SHA $GITSHA at tag $VERSIONTAG"

HERE=`pwd`
CONTAINER="osgeo/proj-docs"
DOCKER="docker"
CONTAINERRUN="$DOCKER run -it -d --entrypoint /bin/sh -v $HERE:/data $CONTAINER"
echo $CONTAINERRUN


CONTAINERID=`$CONTAINERRUN`
echo "Starting container: " $CONTAINERID
cat > docker-package.sh << "EOF"
#!/bin/sh

git clone https://github.com/libspatialindex/libspatialindex.git;
cd /libspatialindex;
EOF

echo "git checkout $GITSHA" >> docker-package.sh

cat >> docker-package.sh << "EOF"
apt-get install libtool m4 automake -y
./autogen.sh
./configure --prefix=/tmp

make dist
EOF

echo "OUTPUTDIR=\"/data/release-$VERSIONTAG\"" >> docker-package.sh

cat >> docker-package.sh << "EOF"
mkdir $OUTPUTDIR

extensions=".tar.gz .tar.bz2"
for ext in $extensions
do


    for filename in $(ls *$ext)
    do

        `md5sum $filename > $filename.md5`
        `sha256sum $filename > $filename.sha256sum`
        `sha512sum $filename > $filename.sha512sum`
        cp $filename $OUTPUTDIR
        cp $filename.md5 $OUTPUTDIR
        cp $filename.sha256sum $OUTPUTDIR
        cp $filename.sha512sum $OUTPUTDIR
    done
done


EOF

chmod +x docker-package.sh
docker cp docker-package.sh $CONTAINERID:/docker-package.sh

docker exec -it $CONTAINERID /docker-package.sh

# run this to halt into the container
#docker exec -it $CONTAINERID bash

command="$DOCKER stop $CONTAINERID"
echo $command
$command