Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/snap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ git clone -b $SNAP_CHANNEL git+ssh://rocket.chat.buildmaster@git.launchpad.net/r
# Rarely will change, but just incase we copy it all
cp -r resources buildinfo launchpad/
sed s/#{RC_VERSION}/$RC_VERSION/ snapcraft.yaml > launchpad/snapcraft.yaml
sed s/#{RC_VERSION}/$RC_VERSION/ resources/prepareRocketChat > launchpad/resources/prepareRocketChat

cd launchpad
git add resources snapcraft.yaml buildinfo
Expand Down
18 changes: 18 additions & 0 deletions .snapcraft/resources/prepareRocketChat
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

curl -SLf "https://releases.rocket.chat/#{RC_VERSION}/download/" -o rocket.chat.tgz

tar xvf rocket.chat.tgz --strip 1

cd programs/server

npm install

# Ideally this will go away. For some reason on install its installing node-v57-linux-x64-glibc but when actually running it is looking for node-v57-linux-x64-unknown
if [[ $(uname -m) == "x86_64" ]]
then
cp -r npm/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc npm/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-unknown
fi

# sharp needs execution stack removed - https://forum.snapcraft.io/t/snap-and-executable-stacks/1812
execstack --clear-execstack npm/node_modules/sharp/vendor/lib/librsvg-2.so.2.42.0
6 changes: 2 additions & 4 deletions .snapcraft/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,15 @@ parts:
build-packages:
- curl
plugin: dump
prepare: curl -SLf "https://releases.rocket.chat/#{RC_VERSION}/download/" -o rocket.chat.tgz; tar xvf rocket.chat.tgz --strip 1; cd programs/server; npm install; npm install grpc@1.6.6;
prepare: ./resources/prepareRocketChat
after: [node]
source: .
stage-packages:
- graphicsmagick
- execstack
stage:
- programs
- main.js
- .node_version.txt
- usr
- lib
mongodb:
build-packages:
- wget
Expand Down