Compare commits

...

11 Commits

Author SHA1 Message Date
80e65529bb Change GitHub branch for release 2021-01-14 21:17:56 +01:00
263a269da9 Adapt AUR bin deploy script to _pkgver for hyphens 2021-01-14 21:04:47 +01:00
3d4259827d New release v1.7.17-sc1 2021-01-14 20:46:00 +01:00
52a7dfcd82 Let AUR and flathub deploy scripts push 2021-01-13 21:50:36 +01:00
ed9740a4c2 Add script to deploy a release on GitHub 2021-01-13 21:47:11 +01:00
cdd8ec775c Enable labs settings with the default config
Close #19
2020-12-26 18:39:36 +01:00
88ef11d716 deploy: Fix flathub releases 2020-12-26 15:28:12 +01:00
acd5e71f6c New release v1.7.16 2020-12-24 15:48:27 +01:00
412cbad76b Automatic theme update and make clean on upstream merge 2020-12-21 19:49:51 +01:00
dfef402e7f Update screenshots 2020-12-16 13:18:43 +01:00
651ffc13df [WIP] Deploy scripts 2020-12-16 00:38:28 +01:00
12 changed files with 175 additions and 5 deletions

View File

@ -11,6 +11,7 @@
"https://scalar-staging.vector.im/api",
"https://scalar-staging.riot.im/scalar/api"
],
"showLabsSettings": true,
"roomDirectory": {
"servers": [
"matrix.org"

1
deploy/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
repos/*

80
deploy/create-github-release.sh Executable file
View File

@ -0,0 +1,80 @@
#!/usr/bin/env bash
#
# Based upon https://hinty.io/ivictbor/publish-and-upload-release-to-github-with-bash-and-curl/
# and https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447
#
set -e
# set -x
version="$1"
releasepath="$2"
github_api_token=`cat ~/githubtoken`
release_notes_file="/tmp/scrn.md"
owner=SchildiChat
repo=schildichat-desktop
target=sc
# Define variables
GH_API="https://api.github.com"
GH_REPO="$GH_API/repos/$owner/$repo"
AUTH="Authorization: token $github_api_token"
# Validate token
curl -o /dev/null -sH "$AUTH" $GH_REPO || { echo "Error: Invalid repo, token or network issue!"; exit 1; }
# Get release notes
$EDITOR "$release_notes_file"
release_notes=`cat "$release_notes_file"`
# Create draft release
echo "Create GitHub draft release ..."
json_string=`jq -n --arg tag "v$version" --arg target "$target" --arg body "$release_notes" '{
tag_name: $tag,
target_commitish: $target,
name: $tag,
body: $body,
draft: true,
prerelease: false
}'`
# echo "$json_string"
res=`echo "$json_string" | curl -sH "$AUTH" $GH_REPO/releases -d @-`
# echo "$res" | jq "."
# Get release id
id=`echo $res | jq ".id"`
# echo "id: $id"
# Upload assets
find "$releasepath" -type f | while read filename; do
echo ""
echo "Uploading $filename ..."
# Construct url
GH_ASSET="https://uploads.github.com/repos/$owner/$repo/releases/$id/assets?name=$(basename $filename)"
# Upload
res=`curl --progress-bar --data-binary @"$filename" -H "$AUTH" -H "Content-Type: application/octet-stream" $GH_ASSET`
state=`echo $res | jq ".state"`
if [ "$state" == "\"uploaded\"" ]; then
echo "Success!"
else
echo "Error:"
echo $res | jq "."
exit -1
fi
done
# Publish draft
res=`curl -sH "$AUTH" $GH_REPO/releases/$id -d '{"draft": false}'`
draft=`echo $res | jq ".draft"`
echo ""
if [ "$draft" == "false" ]; then
echo "Release v$version published on GitHub!"
else
echo "Error:"
echo $res | jq "."
exit -1
fi

35
deploy/update-aur-bin.sh Executable file
View File

@ -0,0 +1,35 @@
#!/bin/bash
set -e
# set -x
DEPLOY_ROOT="$(dirname "$(realpath "$0")")"
version="$1"
debpath="$2"
repopath="$DEPLOY_ROOT/repos/aur-bin"
repourl="ssh://aur@aur.archlinux.org/schildichat-desktop-bin.git"
sha256sum=($(sha256sum $debpath))
[ -d "$repopath" ] || git clone $repourl $repopath
pushd "$repopath" > /dev/null
git fetch
git reset --hard origin/master
sed -i "s|^_pkgver=.*$|_pkgver=$version|" PKGBUILD
sed -i "s|^sha256sums=('.*'$|sha256sums=('$sha256sum'|" PKGBUILD
makepkg --printsrcinfo > .SRCINFO
git add .SRCINFO PKGBUILD
git commit -m "Bump version to v$version"
git push
popd > /dev/null
echo "Release v$version published on AUR!"

46
deploy/update-flathub.sh Executable file
View File

@ -0,0 +1,46 @@
#!/bin/bash
set -e
# set -x
DEPLOY_ROOT="$(dirname "$(realpath "$0")")"
version="$1"
debpath="$2"
repopath="$DEPLOY_ROOT/repos/flathub"
repourl="git@github.com:flathub/chat.schildi.desktop.git"
downloadurl="https://github.com/SchildiChat/schildichat-desktop/releases/download/v${version}/schildichat-desktop_${version}_amd64.deb"
sha256sum=($(sha256sum $debpath))
debsize=($(wc -c $debpath))
debdate=$(date +%Y-%m-%d -r $debpath)
[ -d "$repopath" ] || git clone $repourl $repopath
pushd "$repopath" > /dev/null
git fetch
git reset --hard origin/master
jsonFile="chat.schildi.desktop.json"
jsonString=$(jq -r "." $jsonFile)
xmlFile="chat.schildi.desktop.appdata.xml"
jsonString=$(echo $jsonString | jq -r ".modules[]? |= ((select(.name?==\"schildichat\") | .sources[0].url = \"${downloadurl}\") // .)")
jsonString=$(echo $jsonString | jq -r ".modules[]? |= ((select(.name?==\"schildichat\") | .sources[0].sha256 = \"${sha256sum}\") // .)")
jsonString=$(echo $jsonString | jq -r ".modules[]? |= ((select(.name?==\"schildichat\") | .sources[0].size = ${debsize}) // .)")
echo $jsonString | jq --indent 4 "." > $jsonFile
sed -i "s|^\s\s<releases>$| <releases>\n <release version=\"$version\" date=\"$debdate\"/>|" $xmlFile
git add $jsonFile $xmlFile
git commit -m "Bump version to v$version"
git push
popd > /dev/null
echo "Release v$version published on flathub!"

View File

@ -15,6 +15,13 @@ forall_repos check_branch $branch
forall_repos git fetch upstream
forall_repos git merge upstream/master
./setup.sh
# Automatic theme update
pushd "matrix-react-sdk" > /dev/null
./theme.sh
popd > /dev/null
# Refresh environment
make clean
make setup
popd > /dev/null

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 278 KiB

BIN
screenshots/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB