forked from github/schildichat-desktop
Compare commits
No commits in common. "v1.7.17-sc1" and "v1.7.16" have entirely different histories.
v1.7.17-sc
...
v1.7.16
9 changed files with 87 additions and 94 deletions
|
@ -11,7 +11,6 @@
|
|||
"https://scalar-staging.vector.im/api",
|
||||
"https://scalar-staging.riot.im/scalar/api"
|
||||
],
|
||||
"showLabsSettings": true,
|
||||
"roomDirectory": {
|
||||
"servers": [
|
||||
"matrix.org"
|
||||
|
|
|
@ -1,80 +0,0 @@
|
|||
#!/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
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
# set -x
|
||||
set -x
|
||||
|
||||
DEPLOY_ROOT="$(dirname "$(realpath "$0")")"
|
||||
|
||||
|
@ -20,7 +20,7 @@ pushd "$repopath" > /dev/null
|
|||
git fetch
|
||||
git reset --hard origin/master
|
||||
|
||||
sed -i "s|^_pkgver=.*$|_pkgver=$version|" PKGBUILD
|
||||
sed -i "s|^pkgver=.*$|pkgver=$version|" PKGBUILD
|
||||
sed -i "s|^sha256sums=('.*'$|sha256sums=('$sha256sum'|" PKGBUILD
|
||||
|
||||
makepkg --printsrcinfo > .SRCINFO
|
||||
|
@ -28,8 +28,6 @@ makepkg --printsrcinfo > .SRCINFO
|
|||
git add .SRCINFO PKGBUILD
|
||||
git commit -m "Bump version to v$version"
|
||||
|
||||
git push
|
||||
#git push
|
||||
|
||||
popd > /dev/null
|
||||
|
||||
echo "Release v$version published on AUR!"
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
# set -x
|
||||
set -x
|
||||
|
||||
DEPLOY_ROOT="$(dirname "$(realpath "$0")")"
|
||||
|
||||
|
@ -34,13 +34,11 @@ jsonString=$(echo $jsonString | jq -r ".modules[]? |= ((select(.name?==\"schildi
|
|||
|
||||
echo $jsonString | jq --indent 4 "." > $jsonFile
|
||||
|
||||
sed -i "s|^\s\s<releases>$| <releases>\n <release version=\"$version\" date=\"$debdate\"/>|" $xmlFile
|
||||
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
|
||||
#git push
|
||||
|
||||
popd > /dev/null
|
||||
|
||||
echo "Release v$version published on flathub!"
|
64
deploy/upload-github-release-asset.sh
Executable file
64
deploy/upload-github-release-asset.sh
Executable file
|
@ -0,0 +1,64 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Author: Stefan Buck
|
||||
# License: MIT
|
||||
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447
|
||||
#
|
||||
#
|
||||
# This script accepts the following parameters:
|
||||
#
|
||||
# * owner
|
||||
# * repo
|
||||
# * tag
|
||||
# * filename
|
||||
# * github_api_token
|
||||
#
|
||||
# Script to upload a release asset using the GitHub API v3.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# upload-github-release-asset.sh github_api_token=TOKEN owner=stefanbuck repo=playground tag=v0.1.0 filename=./build.zip
|
||||
#
|
||||
|
||||
# Check dependencies.
|
||||
set -e
|
||||
xargs=$(which gxargs || which xargs)
|
||||
|
||||
# Validate settings.
|
||||
[ "$TRACE" ] && set -x
|
||||
|
||||
CONFIG=$@
|
||||
|
||||
for line in $CONFIG; do
|
||||
eval "$line"
|
||||
done
|
||||
|
||||
# Define variables.
|
||||
GH_API="https://api.github.com"
|
||||
GH_REPO="$GH_API/repos/$owner/$repo"
|
||||
GH_TAGS="$GH_REPO/releases/tags/$tag"
|
||||
AUTH="Authorization: token $github_api_token"
|
||||
WGET_ARGS="--content-disposition --auth-no-challenge --no-cookie"
|
||||
CURL_ARGS="-LJO#"
|
||||
|
||||
if [[ "$tag" == 'LATEST' ]]; then
|
||||
GH_TAGS="$GH_REPO/releases/latest"
|
||||
fi
|
||||
|
||||
# Validate token.
|
||||
curl -o /dev/null -sH "$AUTH" $GH_REPO || { echo "Error: Invalid repo, token or network issue!"; exit 1; }
|
||||
|
||||
# Read asset tags.
|
||||
response=$(curl -sH "$AUTH" $GH_TAGS)
|
||||
|
||||
# Get ID of the asset based on given filename.
|
||||
eval $(echo "$response" | grep -m 1 "id.:" | grep -w id | tr : = | tr -cd '[[:alnum:]]=')
|
||||
[ "$id" ] || { echo "Error: Failed to get release id for tag: $tag"; echo "$response" | awk 'length($0)<100' >&2; exit 1; }
|
||||
|
||||
# Upload asset
|
||||
echo "Uploading asset... "
|
||||
|
||||
# Construct url
|
||||
GH_ASSET="https://uploads.github.com/repos/$owner/$repo/releases/$id/assets?name=$(basename $filename)"
|
||||
|
||||
curl "$GITHUB_OAUTH_BASIC" --data-binary @"$filename" -H "Authorization: token $github_api_token" -H "Content-Type: application/octet-stream" $GH_ASSET
|
14
deploy/upload_github.sh
Executable file
14
deploy/upload_github.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
DEPLOY_ROOT="$(dirname "$(realpath "$0")")"
|
||||
|
||||
version="$1"
|
||||
releasepath="$2"
|
||||
|
||||
find "$releasepath" -type f | while read p; do
|
||||
echo "Uploading $p ..."
|
||||
$DEPLOY_ROOT/upload-github-release-asset.sh github_api_token=$GITHUB_TOKEN owner=SchildiChat repo=schildichat-desktop tag=v$version filename=$p
|
||||
done
|
|
@ -1 +1 @@
|
|||
Subproject commit bdcf4b4449a89c34ca18188669dcd51214ccf246
|
||||
Subproject commit eed928aa5b87e15a3a233ffb3ec2130526617fc5
|
|
@ -1 +1 @@
|
|||
Subproject commit 422851e9cc5cbce01fceadc5fa115996ca1e1e83
|
||||
Subproject commit f647f3e4280b567d92cd7743849966a48e711e78
|
|
@ -1 +1 @@
|
|||
Subproject commit cb31acec3cb6da90aaf690d408d67fb7540d2c6d
|
||||
Subproject commit 894e7d02d82a1d325dfc6bf3c49b186434c0199c
|
Loading…
Add table
Add a link
Reference in a new issue