mirror of
https://github.com/rizinorg/cutter.git
synced 2025-02-20 13:46:06 +00:00
Added release script and appdata.xml (#1028)
This commit is contained in:
parent
af7df8212b
commit
3e922a89e7
49
scripts/release.sh
Executable file
49
scripts/release.sh
Executable file
@ -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 <release version>"
|
||||
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="\ \ \ \ <release version=\"${version}\" date=\"${today}\" />"
|
||||
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"
|
||||
|
@ -25,6 +25,7 @@
|
||||
<update_contact>xarkes</update_contact>
|
||||
|
||||
<releases>
|
||||
<release version="1.7.3" date="2018-12-26" />
|
||||
<release version="1.7.2" date="2018-10-07" />
|
||||
<release version="1.7.1" date="2018-08-25" />
|
||||
<release version="1.7" date="2018-08-17" />
|
||||
|
Loading…
Reference in New Issue
Block a user