Skip to content

Commit

Permalink
Add release engineering script
Browse files Browse the repository at this point in the history
  • Loading branch information
japanoise committed Jul 11, 2022
1 parent ada2482 commit de4c8a6
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*.stackdump
emsys
unicodetest
/build
50 changes: 50 additions & 0 deletions dist.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/sh
usage() {
echo "$0 CC VERSION DISTNAME" >&2
}
if [ -z "$1" ]
then
usage
exit 1
fi
if [ -z "$2" ]
then
usage
exit 1
fi
if [ -z "$3" ]
then
usage
exit 1
fi

compiler="$1"
version="$2"
distname="$3"
progname="emsys"
archive="$progname-$distname-$version"

make clean
make CC="$compiler" VERSION="$version" || exit 1

echo ""
echo "Building complete, stripping"
echo "(one error expected, either you do or don't have a .exe)"
echo ""

strip -v "$progname"
strip -v "$progname".exe

echo ""
echo "Done, now build archive"
echo "(one error expected, either you do or don't have a .exe)"
echo ""

(
mkdir -pv build/"$archive"
cp -v "$progname" build/"$archive"
cp -v "$progname".exe build/"$archive"
cp -v "$progname".1 README.md LICENSE CHANGELOG build/"$archive"
cd build || exit 1
tar cvzf "$archive".tar.gz "$archive"
)

0 comments on commit de4c8a6

Please sign in to comment.