1
0
Fork 0

Add release script

This commit is contained in:
fosslinux 2020-12-29 10:05:07 +11:00
parent 81b414b362
commit 852b15a65d
2 changed files with 48 additions and 4 deletions

View File

@ -1,9 +1,7 @@
# Gophernicus
Latest stable release: Version 3.0.1
NOTE: The master branch is rolling Development! DO NOT USE unless you want fiery dragons!
(you probably want to `git checkout 3.0.1`)
This release: Version DEVEL
NOTE: The master branch is rolling Development! DO NOT USE unless you want fiery dragons! (you probably want to `git checkout 3.0.1`)
*Copyright (c) 2009-2018 Kim Holviala*

46
release.sh Executable file
View File

@ -0,0 +1,46 @@
#!/bin/sh
set -ex
RELEASE=3.1rc1
# Create release branch
git branch "v${RELEASE}"
# Create tmpdir
TMPDIR=$(mktemp -d)
cp -r . "${TMPDIR}/gophernicus-${RELEASE}"
cd "${TMPDIR}/gophernicus-${RELEASE}"
# Remove build leftovers etc
rm -rf src/*.o src/files.h src/filetypes.h src/bin2c src/gophernicus Makefile README README.options
# Remove things
rm -rf .git .gitignore .travis .travis.yml release.sh
# Change readme for devel
sed -i '/The master branch is rolling Development/d' README.md
sed -i "s/ DEVEL$/ ${RELEASE}/" README.md
# Create tarball(s)
cd "${TMPDIR}"
tar -czvf "gophernicus-${RELEASE}.tar.gz" "gophernicus-${RELEASE}"
tar -cjvf "gophernicus-${RELEASE}.tar.bz2" "gophernicus-${RELEASE}"
tar -cJvf "gophernicus-${RELEASE}.tar.xz" "gophernicus-${RELEASE}"
# Create binaries
cd "${TMPDIR}/gophernicus-${RELEASE}"
# x86_64-glibc
./configure --listener=none --os=linux --hostname=HOSTNAME
make
strip src/gophernicus
cp src/gophernicus "../gophernicus-${RELEASE}-x86_64-glibc"
make clean
# x86-64-static
export CFLAGS="-static"
export LDFLAGS="-static"
./configure --listener=none --os=linux --hostname=HOSTNAME
make
strip src/gophernicus
cp src/gophernicus "../gophernicus-${RELEASE}-x86_64-static"
make clean