From 3e922a89e7209bd7b96fad3f04f9b186acb755c4 Mon Sep 17 00:00:00 2001 From: xarkes Date: Wed, 26 Dec 2018 11:52:25 +0100 Subject: [PATCH] Added release script and appdata.xml (#1028) --- scripts/release.sh | 49 +++++++++++++++++++++++++++++++ src/org.radare.Cutter.appdata.xml | 1 + 2 files changed, 50 insertions(+) create mode 100755 scripts/release.sh diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100755 index 00000000..05d9f2bf --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,49 @@ +#!/bin/sh +# A small script to go faster when releasing + +FILES=".appveyor.yml README.md docs/_config.yml docs/index.md" + +# Quick check on arguments +if [ ! "$#" -eq 1 ]; then + echo "Usage: $0 " + exit 1 +fi + +# Get old version in x.x.x format +old_version=$(git tag | grep v | tail -n1 | cut -c2-) +version="$1" + +# Do files modification +git checkout -b "r${version}" +echo "Releasing version '${version}'..." + +# Modify version in the global files +for file in ${FILES}; do + sed -i "s,${old_version},${version},g" "${file}" +done + +# Add a row in appdata.xml +n=$(grep -ne 1.7.2 src/org.radare.Cutter.appdata.xml | cut -f1 -d:) +today=$(date +%F) +line="\ \ \ \ " +sed -i "${n}i${line}" ./src/org.radare.Cutter.appdata.xml + +# Show difference +git diff + +# Commit and push +git add ${FILES} src/org.radare.Cutter.appdata.xml +git commit -m "Release ${version}" +git push origin "r${version}" + +# Checkout to master and create tag +# Meanwhile, the branch must be merged into master +sleep 60 +git checkout master +git pull +git tag "v${version}" +git push --tags + +# Now print changelog... +git log "v${old_version}..HEAD" + diff --git a/src/org.radare.Cutter.appdata.xml b/src/org.radare.Cutter.appdata.xml index 3dae6e1b..a16bb433 100644 --- a/src/org.radare.Cutter.appdata.xml +++ b/src/org.radare.Cutter.appdata.xml @@ -25,6 +25,7 @@ xarkes +