1
0
mirror of https://github.com/MatMoul/g810-led.git synced 2024-12-23 09:16:11 +00:00
g810-led/makerelease
Dylan Baker 04370a1dae meson: Add a meson build system
meson is a build system generator similar to cmake or autotools, but
without the crazy of either of those languages. It provides a pleasant
scripting language that is inspired by languages like python, but is not
python. It has a non-turing complete language, with an emphasis on
upstream functionality instead of downstream scripts. It has support for
most Unix-like OSes, including linux, the four major BSDs, and macOS.
this includes support for abstracting dependency discovery, using
pkg-config, macOS frameworks, cmake, and some hand coded extensions.

It provides nice features like builtin support for debug builds,
changing from static to shared library builds, turning warning arguments
on and off, generates for pkg-config, and other modern niceties.

For g810-led this provides a number of advantages for distro packaging.
Distros already use meson for projects like mesa, systemd, and gnome, so
they're packaging wrappers already know how to configure, build, and
install meson based packages. It also provides advantages when moving to
other platforms, as meson understands the difference between clang,
apple's clang fork, gcc, and a host of other compilers.
2020-05-07 15:53:29 -07:00

59 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
if [ "$1" == "" ]; then
echo "Error: No version provided"
echo "./makerelease 0.0.1"
exit 1
fi
ssh -T git@github.com
if [ ! "$?" = "1" ]; then
echo "No Github ssh key loaded exiting..."
exit 1
fi
clear
branch=$(git rev-parse --abbrev-ref HEAD)
read -p "Current branch is $branch. Continue ? (y/N)" choice
case "$choice" in
n|N|'' )
echo "Cancel !"
exit 1
;;
y|Y ) echo "Make release...";;
* )
echo "Cancel !"
exit 1
;;
esac
# Ready to update :
version=$1
sed -i "/string version = /c\\\tstring version = \"$version\";" src/helpers/help.cpp
sed -i -E "s/(^\s*version :).*/\1 '$version',/" meson.build
IFS='.' read -ra VPART <<< "$version"
sed -i "/MAJOR=/cMAJOR=${VPART[0]}" makefile
sed -i "/MINOR=/cMINOR=${VPART[1]}" makefile
sed -i "/MICRO=/cMICRO=${VPART[2]}" makefile
git commit -m "Version $version" makefile meson.build src/*
git push
git checkout master
git merge develop
git push
git tag -a "v$version" -m "Version $version"
git push --tags
git checkout $branch
#wget https://github.com/MatMoul/g810-led/archive/v$version.zip
#wget https://github.com/MatMoul/g810-led/archive/v$version.tar.gz
#Publish to aur...