This repository has been archived by the owner on Oct 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci-build.sh
executable file
·54 lines (45 loc) · 1.88 KB
/
ci-build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
# Copyright (C) 2019 Junpei Kawamoto
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set -ev
yarn build:production
yarn dist
if [[ "${TRAVIS_PULL_REQUEST}" = "false" ]]; then
exit 0
fi
brew tap jkawamoto/pixeldrain
brew install pixeldrain
pd -v
WIN_ID=$(basename $(pd upload dist/fileshare-desktop-0.4.1-setup_x64.exe))
echo "Dev build for Windows has been uploaded at ${WIN_ID}"
MAC_ID=$(basename $(pd upload dist/fileshare-desktop-0.4.1.dmg))
echo "Dev build for MacOS has been uploaded at ${MAC_ID}"
LINUX_ID=$(basename $(pd upload dist/fileshare-desktop-0.4.1.AppImage))
echo "Dev build for Linux has been uploaded at ${LINUX_ID}"
LIST_URL=$(pd create-list -t "StoreWiseFileShare-0.4.1" ${WIN_ID}:fileshare-desktop-0.4.1-setup_x64.exe ${MAC_ID}:fileshare-desktop-0.4.1.dmg ${LINUX_ID}:fileshare-desktop-0.4.1.AppImage)
echo "Download page for the dev builds are set up at ${LIST_URL}"
curl -XPOST -H 'Content-Type:application/json' $DISCORD_WEBHOOK -d @- <<EOF
{
"embeds": [{
"title": "Development build of $TRAVIS_PULL_REQUEST_BRANCH",
"description": "Build [#$TRAVIS_BUILD_NUMBER]($TRAVIS_BUILD_WEB_URL) of $TRAVIS_REPO_SLUG@$TRAVIS_PULL_REQUEST_BRANCH: $LIST_URL",
"url": "$LIST_URL",
"color": "2664261",
"thumbnail": {
"url": "https://goobox.io/icon-192x192.png"
}
}]
}
EOF