diff --git a/.docker/dockerfiles/develop/Dockerfile b/.docker/dockerfiles/develop/Dockerfile index d43c1d2cd2cd..cbb9a7bfe124 100644 --- a/.docker/dockerfiles/develop/Dockerfile +++ b/.docker/dockerfiles/develop/Dockerfile @@ -16,7 +16,7 @@ RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 0E163286C20D07B9787EB WORKDIR /app -RUN curl -fSL "https://s3.amazonaws.com/rocketchatbuild/develop.rocket.chat-v.latest.tgz" -o rocket.chat.tgz \ +RUN curl -fSL "https://s3.amazonaws.com/rocketchatbuild/rocket.chat-develop.tgz" -o rocket.chat.tgz \ && tar zxvf ./rocket.chat.tgz \ && rm ./rocket.chat.tgz \ && cd /app/bundle/programs/server \ diff --git a/.docker/dockerfiles/master/Dockerfile b/.docker/dockerfiles/master/Dockerfile index 32770f2b470b..dd62d8cc71e2 100644 --- a/.docker/dockerfiles/master/Dockerfile +++ b/.docker/dockerfiles/master/Dockerfile @@ -16,7 +16,7 @@ RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 0E163286C20D07B9787EB WORKDIR /app -RUN curl -fSL "https://s3.amazonaws.com/rocketchatbuild/master.rocket.chat-v.latest.tgz" -o rocket.chat.tgz \ +RUN curl -fSL "https://s3.amazonaws.com/rocketchatbuild/rocket.chat-master.tgz" -o rocket.chat.tgz \ && tar zxvf ./rocket.chat.tgz \ && rm ./rocket.chat.tgz \ && cd /app/bundle/programs/server \ diff --git a/.sandstorm/buildrc.sh b/.sandstorm/buildrc.sh deleted file mode 100755 index 159c8a83b021..000000000000 --- a/.sandstorm/buildrc.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -cd /tmp -spk init -p3000 -- nothing -export SANDSTORM_ID="$(grep '\sid =' sandstorm-pkgdef.capnp)" -cd $TRAVIS_BUILD_DIR -export METEOR_WAREHOUSE_DIR="${METEOR_WAREHOUSE_DIR:-$HOME/.meteor}" -export METEOR_DEV_BUNDLE=$(dirname $(readlink -f "$METEOR_WAREHOUSE_DIR/meteor"))/dev_bundle -cd /home/vagrant && tar zxf ./Rocket.Chat.tar.gz -rm ./Rocket.Chat.tar.gz -cd /home/vagrant/bundle/programs/server && "$METEOR_DEV_BUNDLE/bin/npm" install -cd $TRAVIS_BUILD_DIR/.sandstorm -sed -i "s/\sid = .*/$SANDSTORM_ID/" sandstorm-pkgdef.capnp -mkdir -p /home/vagrant/bundle/opt/app/.sandstorm/ -cp /opt/app/.sandstorm/launcher.sh /home/vagrant/bundle/opt/app/.sandstorm/ -sed -i "s/\spgp/#pgp/g" sandstorm-pkgdef.capnp -spk pack $TRAVIS_BUILD_DIR/rocket.chat.latest.spk diff --git a/.sandstorm/preprcbuild.sh b/.sandstorm/preprcbuild.sh deleted file mode 100755 index e7ea8528c105..000000000000 --- a/.sandstorm/preprcbuild.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -cd /tmp -curl https://dl.sandstorm.io/sandstorm-$SANDSTORM_VERSION.tar.xz | tar -xJf - -sudo mkdir -p /home/vagrant -sudo chown -R travis /home/vagrant -sudo mkdir -p /opt -sudo chown -R travis /opt -cd /opt -curl curl https://dl.sandstorm.io/meteor-spk-0.1.8.tar.xz | tar -xJf - -ln -s meteor-spk-0.1.8 meteor-spk -cp -a /bin/bash /opt/meteor-spk/meteor-spk.deps/bin/ -cp -a /lib/x86_64-linux-gnu/libncurses.so.* /opt/meteor-spk/meteor-spk.deps/lib/x86_64-linux-gnu/ -cp -a /lib/x86_64-linux-gnu/libtinfo.so.* /opt/meteor-spk/meteor-spk.deps/lib/x86_64-linux-gnu/ -cd $TRAVIS_BUILD_DIR -cp -r . /opt/app diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index 685352e67ad4..3451445dd382 100644 --- a/.sandstorm/sandstorm-pkgdef.capnp +++ b/.sandstorm/sandstorm-pkgdef.capnp @@ -19,9 +19,9 @@ const pkgdef :Spk.PackageDefinition = ( appTitle = (defaultText = "Rocket.Chat"), - appVersion = 2, # Increment this for every release. + appVersion = 3, # Increment this for every release. - appMarketingVersion = (defaultText = "0.7.2445"), + appMarketingVersion = (defaultText = "0.8.0"), # Human-readable representation of appVersion. Should match the way you # identify versions of your app in documentation and marketing. diff --git a/.travis.yml b/.travis.yml index df91835e5a98..b88a50ff57b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,41 +4,43 @@ branches: only: - develop - master + - even-faster-deploy node_js: - '0.12' +cache: + directories: + - ~/.meteor before_install: -- curl https://install.meteor.com | /bin/sh - npm install -g npm@'>=2.13.5' - mkdir -p node_modules -- cd $TRAVIS_BUILD_DIR -- mkdir ../build -- export TAG=$(git describe --abbrev=0 --tags) -- export SANDSTORM_VERSION=$(curl -f "https://install.sandstorm.io/dev?from=0&type=install") -- export PATH=$PATH:/tmp/sandstorm-$SANDSTORM_VERSION/bin -- cd .sandstorm -- ./preprcbuild.sh +install: +- curl https://install.meteor.com | /bin/sh +before_script: +- mkdir /tmp/build script: -- cd $TRAVIS_BUILD_DIR -- if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then echo "Building PR $TRAVIS_PULL_REQUEST"; meteor build ../build; exit $?; fi -- meteor build ../build -- cp ../build/Rocket.Chat.tar.gz /home/vagrant -- cd .travis -- sh ./namefiles.sh -- cd $TRAVIS_BUILD_DIR/.sandstorm -- ./buildrc.sh -- cd $TRAVIS_BUILD_DIR -- mv rocket.chat.latest.spk ../build +- meteor build /tmp/build +before_deploy: +- mkdir /tmp/deploy +- .travis/namefiles.sh +- .travis/sandstorm.sh deploy: - provider: s3 - access_key_id: "AKIAIKIA7H7D47KUHYCA" - secret_access_key: $ACCESSKEY - bucket: "rocketchatbuild" - skip_cleanup: true - local_dir: ../build - on: - branch: - - develop - - master + - provider: s3 + access_key_id: "AKIAIKIA7H7D47KUHYCA" + secret_access_key: $ACCESSKEY + bucket: "rocketchatbuild" + skip_cleanup: true + local_dir: /tmp/deploy + on: + branch: + - develop + - master + - even-faster-deploy + - provider: releases + api_key: "GITHUB OAUTH TOKEN" + file: "FILE TO UPLOAD" + skip_cleanup: true + on: + branch: master + tags: true after_deploy: -- cd .travis -- ./builddocker.sh +- .travis/docker.sh diff --git a/.travis/builddocker.sh b/.travis/docker.sh similarity index 98% rename from .travis/builddocker.sh rename to .travis/docker.sh index 14d59768cc58..a6afcceb1c89 100755 --- a/.travis/builddocker.sh +++ b/.travis/docker.sh @@ -1,6 +1,6 @@ #!/bin/bash - set -euo pipefail +IFS=$'\n\t' # TRAVIS_TAG='v0.7' # TAG="v0.7" diff --git a/.travis/namefiles.sh b/.travis/namefiles.sh index 4b0f3b12ee07..4848dea2b11d 100755 --- a/.travis/namefiles.sh +++ b/.travis/namefiles.sh @@ -1,4 +1,7 @@ -cd ../../build -FILENAME=rocket.chat-"$TAG.$TRAVIS_BUILD_NUMBER.$TRAVIS_BRANCH".tgz -mv Rocket.Chat.tar.gz "$FILENAME" -ln -s "$FILENAME" "$TRAVIS_BRANCH.rocket.chat-v.latest.tgz" +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +#cd $TRAVIS_BUILD_DIR +#export TAG=$(git describe --abbrev=0 --tags) +ln -s /tmp/build/Rocket.Chat.tar.gz "/tmp/deploy/rocket.chat-$TRAVIS_BRANCH.tgz" diff --git a/.travis/sandstorm.sh b/.travis/sandstorm.sh new file mode 100755 index 000000000000..43250534b7ef --- /dev/null +++ b/.travis/sandstorm.sh @@ -0,0 +1,38 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +export SANDSTORM_VERSION=$(curl -f "https://install.sandstorm.io/dev?from=0&type=install") +export PATH=$PATH:/tmp/sandstorm-$SANDSTORM_VERSION/bin + +cd /tmp +curl https://dl.sandstorm.io/sandstorm-$SANDSTORM_VERSION.tar.xz | tar -xJf - + +sudo mkdir -p /opt +sudo chown -R travis /opt +cd /opt +curl https://dl.sandstorm.io/meteor-spk-0.1.8.tar.xz | tar -xJf - +ln -s meteor-spk-0.1.8 meteor-spk +cp -a /bin/bash /opt/meteor-spk/meteor-spk.deps/bin/ +cp -a /lib/x86_64-linux-gnu/libncurses.so.* /opt/meteor-spk/meteor-spk.deps/lib/x86_64-linux-gnu/ +cp -a /lib/x86_64-linux-gnu/libtinfo.so.* /opt/meteor-spk/meteor-spk.deps/lib/x86_64-linux-gnu/ +ln -s $TRAVIS_BUILD_DIR /opt/app + +cd /tmp +spk init -p3000 -- nothing +export SANDSTORM_ID="$(grep '\sid =' sandstorm-pkgdef.capnp)" + +cd $TRAVIS_BUILD_DIR +export METEOR_WAREHOUSE_DIR="${METEOR_WAREHOUSE_DIR:-$HOME/.meteor}" +export METEOR_DEV_BUNDLE=$(dirname $(readlink -f "$METEOR_WAREHOUSE_DIR/meteor"))/dev_bundle + +sudo mkdir -p /home/vagrant +sudo chown -R travis /home/vagrant +tar -zxf /tmp/build/Rocket.Chat.tar.gz --directory /home/vagrant/ +cd /home/vagrant/bundle/programs/server && "$METEOR_DEV_BUNDLE/bin/npm" install +cd $TRAVIS_BUILD_DIR/.sandstorm +sed -i "s/\sid = .*/$SANDSTORM_ID/" sandstorm-pkgdef.capnp +mkdir -p /home/vagrant/bundle/opt/app/.sandstorm/ +cp /opt/app/.sandstorm/launcher.sh /home/vagrant/bundle/opt/app/.sandstorm/ +sed -i "s/\spgp/#pgp/g" sandstorm-pkgdef.capnp +spk pack /tmp/deploy/rocket.chat-$TRAVIS_BRANCH.spk diff --git a/README.md b/README.md index 677f275c0c49..d98545756aa9 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,8 @@ Branch **develop** (Newer but unstable): ## Sandstorm.io [![Rocket.Chat on Sandstorm.io](https://raw.githubusercontent.com/Sing-Li/bbug/master/images/sandstorm.jpg)](https://apps.sandstorm.io/app/vfnwptfn02ty21w715snyyczw0nqxkv3jvawcah10c6z7hj1hnu0) -_*Grab*_ the latest [Sandstorm SPK](https://s3.amazonaws.com/rocketchatbuild/rocket.chat.latest.spk) for testing on your own server. +_*Grab*_ the latest [Sandstorm SPK](https://s3.amazonaws.com/rocketchatbuild/rocket.chat-develop.spk) for testing on your own server. + ## Sloppy.io Host your docker container at [sloppy.io](http://sloppy.io). Get an account and use the [quickstarter](https://github.com/sloppyio/quickstarters/tree/master/rocketchat) diff --git a/rocketchat.info b/rocketchat.info index f9a62bc59fe3..12759ff27480 100644 --- a/rocketchat.info +++ b/rocketchat.info @@ -1,3 +1,3 @@ { - "version": "0.7.0" + "version": "0.8.0" }