Skip to content

Commit

Permalink
Merge tag 'v1.5.12-rolling-beta' into hebrew-support
Browse files Browse the repository at this point in the history
v1.5.12-rolling-beta

# Conflicts:
#	package-lock.json
#	package.json
#	src/ui/views/messages.coffee
  • Loading branch information
yossizahn committed Jul 12, 2022
2 parents 393225e + 12a5a53 commit 54dc0ba
Show file tree
Hide file tree
Showing 31 changed files with 17,574 additions and 3,384 deletions.
22 changes: 11 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- 14
- 15
notifications:
email: false

Expand All @@ -18,6 +18,8 @@ before_install:
before_deploy:
# YAKYAK_VERSION is used in the files to copy
- export YAKYAK_VERSION=`node -e "console.log(require('./package.json').version);"`
# branch
- export YAKYAK_BRANCH=`node -e "console.log(require('./package.json').branch);"`
# debug information for the electron packager
- export DEBUG=electron-packager
# allows to have wine with 32-bits
Expand Down Expand Up @@ -51,20 +53,18 @@ before_deploy:
# Flatpak
# install flatpak dependencies
#
## Commented out as it is not working
##
#- sudo add-apt-repository ppa:alexlarsson/flatpak -y
#- sudo apt-get update -qq
#- sudo apt-get install flatpak-builder flatpak -qq
#- flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
- sudo add-apt-repository ppa:alexlarsson/flatpak -y
- sudo apt-get update -qq
- sudo apt-get install flatpak-builder flatpak elfutils -qq
- flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
## 64-bits
#- flatpak --user install flathub org.freedesktop.Sdk/x86_64/1.6
#- flatpak --user install flathub org.freedesktop.Platform/x86_64/1.6
- flatpak --user --noninteractive install flathub org.freedesktop.Sdk/x86_64/19.08
- flatpak --user --noninteractive install flathub org.freedesktop.Platform/x86_64/19.08
## 32-bits
#- flatpak --user install flathub org.freedesktop.Sdk/i386/1.6
#- flatpak --user install flathub org.freedesktop.Platform/i386/1.6
#
#- npm run -loglevel ${NPM_DEBUG_LEVEL} gulp deploy:linux-x64:flatpak:nodep
- npm run -loglevel ${NPM_DEBUG_LEVEL} gulp deploy:linux-x64:flatpak:nodep
#- npm run -loglevel ${NPM_DEBUG_LEVEL} gulp deploy:linux-ia32:flatpak:nodep

deploy:
Expand Down Expand Up @@ -96,7 +96,7 @@ deploy:
#
- "dist/yakyak-${YAKYAK_VERSION}-win32-ia32.zip"
#
# - "dist/com.github.yakyak.YakYak_master_x64.flatpak"
- "dist/com.github.yakyak.YakYak_${YAKYAK_BRANCH}_x64.flatpak"
# - "dist/com.github.yakyak.YakYak_master_ia32.flatpak"
# only trigger on tags
on:
Expand Down
112 changes: 71 additions & 41 deletions gulpfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ liveReload = require 'gulp-livereload'
changed = require 'gulp-changed'
rename = require 'gulp-rename'
packager = require 'electron-packager'
flatpak = try require 'electron-installer-flatpak'
flatpak = try require '@malept/electron-installer-flatpak'
debian = try require 'electron-installer-debian'
filter = require 'gulp-filter'
Q = require 'q'
Stream = require 'stream'
spawn = require('child_process').spawn
glob = require('glob')

#
#
Expand Down Expand Up @@ -233,7 +234,8 @@ buildDeployTask = (platform, arch) ->

#
# task to deploy all
allNames = []
defaultNames = []
fullNames = []
names = {linux: [], win32: [], darwin: []}
#

Expand Down Expand Up @@ -323,6 +325,16 @@ deploy = (platform, arch, cb) ->
console.error(error)
.then (appPaths) ->
if appPaths?.length > 0
# Work around issue when upgrading from an older version that causes
# it to use the old app directory, rather than the new app.asar file.
# This is due to electron checking for the app dir first, then the asar.
# See: https://github.com/electron/electron/blob/master/lib/browser/init.ts#L84
files = glob.sync "#{appPaths[0]}/**/app.asar", {nodir: true}
if files.length > 0
resPath = path.dirname files[0]
fs.mkdirSync "#{resPath}/app", {recursive: true}
fs.writeFileSync "#{resPath}/app/package.json", ""

if process.env.NO_ZIP
cb()
return deferred.resolve()
Expand Down Expand Up @@ -352,7 +364,7 @@ platformOpts.map (plat) ->
# create a task per platform/architecture
taskName = buildDeployTask(plat, arch)
names[plat].push taskName
allNames.push taskName
defaultNames.push taskName
#
# create arch-independet task
gulp.task "deploy:#{plat}", gulp.series 'default', names[plat]...
Expand Down Expand Up @@ -381,10 +393,9 @@ archOpts.forEach (arch) ->
else
suffix = target

if target == 'pacman'
packageName = json.name + '-VERSION-linux-' + archNameSuffix + '-pacman.' + suffix
else
packageName = json.name + '-VERSION-linux-' + archNameSuffix + '.' + suffix
packageName = json.name + '-' + json.version + '-linux-' + archNameSuffix +
(if target is 'pacman' then '-pacman.' else '.') + suffix

iconArgs = [16, 32, 48, 128, 256, 512].map (size) ->
if size < 100
src = "0#{size}"
Expand Down Expand Up @@ -415,7 +426,7 @@ archOpts.forEach (arch) ->
child = spawn 'fpm', fpmArgs
child.stdout.on 'data', (data) ->
# do nothing
console.log("fpm: #{data}") if target == 'rpm'
console.log("fpm: #{data}")
done()
return true
# log all errors
Expand All @@ -434,8 +445,9 @@ archOpts.forEach (arch) ->
console.log 'fpm arguments: ' + fpmArgs.join(' ')
process.exit(1)
return child
#names['linux'].push 'deploy:linux-' + arch + ':' + target
#allNames.push('deploy:linux-' + arch + ':' + target)

names['linux'].push 'deploy:linux-' + arch + ':' + target
fullNames.push('deploy:linux-' + arch + ':' + target)

gulp.task "deploy:linux-#{arch}:#{target}",
gulp.series("deploy:linux-#{arch}", "deploy:linux-#{arch}:#{target}:nodep")
Expand Down Expand Up @@ -477,38 +489,56 @@ archOpts.forEach (arch) ->
options.rename = (dest, src) -> path.join(dest, "#{json.name}-#{json.version}-linux-#{options.arch}.deb")
debian options

done()

names['linux'].push 'deploy:linux-' + arch + ':deb'
fullNames.push('deploy:linux-' + arch + ':deb')

gulp.task "deploy:linux-#{arch}:deb",
gulp.series("deploy:linux-#{arch}", "deploy:linux-#{arch}:deb:nodep")

gulp.task "deploy:linux-#{arch}:flatpak:nodep", (done) ->
flatpakOptions =
id: 'com.github.yakyak.YakYak'
arch: arch
runtimeVersion: "1.6"
src: 'dist/yakyak-linux-' + arch
dest: 'dist/'
genericName: 'Internet Messenger'
productName: 'YakYak'
icon:
'16x16': 'src/icons/icon_016.png'
'32x32': 'src/icons/icon_032.png'
'48x48': 'src/icons/icon_048.png'
'128x128': 'src/icons/icon_128.png'
'256x256': 'src/icons/icon_256.png'
'512x512': 'src/icons/icon_512.png'
categories: ['Network', 'InstantMessaging']
finishArgs: ['-v']
flatpak flatpakOptions, (err) ->
if err
console.error err.stack
done()
process.exit 1
else
console.log "Created flatpak (#{json.name}_#{json.version}_#{arch}.flatpak)"
done()
gulp.task "deploy:linux-#{arch}:flatpak",
gulp.series("deploy:linux-#{arch}", "deploy:linux-#{arch}:flatpak:nodep")
#names['linux'].push 'deploy:linux-' + arch + ':flatpak'
#allNames.push('deploy:linux-' + arch + ':flatpak')
# flatpak only works on x64
if arch is 'x64'
gulp.task "deploy:linux-#{arch}:flatpak:nodep", (done) ->
flatpakOptions =
id: 'com.github.yakyak.YakYak'
arch: arch
src: 'dist/yakyak-linux-' + arch
dest: 'dist/'
branch: "#{json.branch}"
genericName: 'Internet Messenger'
productName: 'YakYak'
icon:
'16x16': 'src/icons/icon_016.png'
'32x32': 'src/icons/icon_032.png'
'48x48': 'src/icons/icon_048.png'
'128x128': 'src/icons/icon_128.png'
'256x256': 'src/icons/icon_256.png'
'512x512': 'src/icons/icon_512.png'
categories: ['Network', 'InstantMessaging']
finishArgs: [
'--socket=x11'
'--socket=wayland'
'--share=ipc'
'--device=dri'
'--socket=pulseaudio'
'--filesystem=home'
'--env=TMPDIR=/var/tmp'
'--share=network'
'--talk-name=org.freedesktop.Notifications'
]
flatpak flatpakOptions, (err) ->
if err
console.error err.stack
done()
process.exit 1
else
console.log "Created flatpak (#{json.name}_#{json.version}_#{arch}.flatpak)"
done()
gulp.task "deploy:linux-#{arch}:flatpak",
gulp.series("deploy:linux-#{arch}", "deploy:linux-#{arch}:flatpak:nodep")
names['linux'].push 'deploy:linux-' + arch + ':flatpak'
fullNames.push('deploy:linux-' + arch + ':flatpak')

gulp.task 'deploy', gulp.series 'default', allNames...
gulp.task 'deploy', gulp.series 'default', defaultNames...
gulp.task 'deploy:full', gulp.series 'default', defaultNames..., fullNames...
Loading

0 comments on commit 54dc0ba

Please sign in to comment.