flathub automation
This commit is contained in:
parent
33054b4bf0
commit
90de0e3eec
27
resources/scripts/.flathub-release.sh
Normal file
27
resources/scripts/.flathub-release.sh
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This script will pull Flathub/Textosaurus repo
|
||||||
|
# and push new appdata/flatpak-json to new branch.
|
||||||
|
echo "flathub"
|
||||||
|
|
||||||
|
commit_hash=$2
|
||||||
|
tag=$1
|
||||||
|
json_file="com.github.rssguard.json"
|
||||||
|
json_file_new="${json_file}.new"
|
||||||
|
|
||||||
|
git clone https://martinrotter:${GH_TOKEN}@github.com/flathub/com.github.rssguard.git ./flathub
|
||||||
|
cd flathub
|
||||||
|
|
||||||
|
# Remove branch and create new one.
|
||||||
|
git push -d origin new-version
|
||||||
|
git branch -D new-version
|
||||||
|
git checkout -b new-version
|
||||||
|
|
||||||
|
# Replace old commit hash and branch.
|
||||||
|
cat "$json_file" | sed -e "s@\"branch\": \".*\"@\"branch\": \"$tag\"@g" > "$json_file_new"
|
||||||
|
cat "$json_file_new" | sed -e "s@\"commit\": \".*\"@\"commit\": \"$commit_hash\"@g" > "$json_file"
|
||||||
|
|
||||||
|
cat "$json_file"
|
||||||
|
|
||||||
|
git commit -a -m "New version for commit $commit_hash."
|
||||||
|
git push origin new-version -f
|
@ -5,7 +5,7 @@ source /opt/qt512/bin/qt512-env.sh
|
|||||||
mkdir rssguard-build && cd rssguard-build
|
mkdir rssguard-build && cd rssguard-build
|
||||||
|
|
||||||
# Build application.
|
# Build application.
|
||||||
lrelease -compress ../rssguard.pro
|
#lrelease -compress ../rssguard.pro
|
||||||
qmake .. "USE_WEBENGINE=$USE_WEBENGINE"
|
qmake .. "USE_WEBENGINE=$USE_WEBENGINE"
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
@ -60,4 +60,17 @@ mv "$wikifilenew" "$wikifile"
|
|||||||
cd ./build-wiki
|
cd ./build-wiki
|
||||||
git commit -a -m "New files."
|
git commit -a -m "New files."
|
||||||
git pull origin master
|
git pull origin master
|
||||||
git push origin master
|
git push origin master
|
||||||
|
|
||||||
|
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
|
||||||
|
|
||||||
|
echo "Current git commit hash is $(git rev-parse HEAD)."
|
||||||
|
echo "Travis branch $TRAVIS_BRANCH and Travis tag $TRAVIS_TAG."
|
||||||
|
|
||||||
|
#if [[ $TRAVIS_BRANCH == $TRAVIS_TAG ]]; then
|
||||||
|
if [[ true ]]; then
|
||||||
|
# We will trigger stuff for Flathub.
|
||||||
|
cd ../../..
|
||||||
|
chmod +x ../resources/scripts/.flathub-release.sh
|
||||||
|
../resources/scripts/.flathub-release.sh $TRAVIS_TAG $(git rev-parse HEAD)
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user