Skip to content
Snippets Groups Projects
Commit e9e9179d authored by S. Li's avatar S. Li
Browse files

add buildinfo and revision number support

parent 805bda94
No related branches found
No related tags found
No related merge requests found
......@@ -8,8 +8,13 @@ node_js:
before_install:
- curl https://install.meteor.com | /bin/sh
script:
- mkdir ../build
- cd travis
- npm install
- npm start
- cd ..
- meteor build ../build
- cd travis
- sh ./namefiles.sh
deploy:
provider: s3
access_key_id: "AKIAIKIA7H7D47KUHYCA"
......
v0.6.dev
v0.6.3222
# Meteor packages used by this project, one per line.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
accounts-facebook
accounts-github
accounts-google
accounts-meteor-developer
accounts-password
accounts-twitter
coffeescript
email
fastclick
http
jquery
less
reactive-dict
reactive-var
service-configuration
arunoda:streams
rocketchat:lib
rocketchat:autolinker
rocketchat:colors
rocketchat:custom-oauth
rocketchat:emojione
rocketchat:favico
rocketchat:file
rocketchat:gitlab
rocketchat:wordpress
rocketchat:highlight
rocketchat:ldap
rocketchat:logger
#rocketchat:markdown
rocketchat:me
rocketchat:mentions
rocketchat:message-star
rocketchat:oembed
rocketchat:slashcommands-invite
rocketchat:slashcommands-join
rocketchat:slashcommands-leave
rocketchat:spotify
rocketchat:statistics
rocketchat:webrtc
#rocketchat:chatops
#rocketchat:livechat
#rocketchat:hubot
#rocketchat:irc
konecty:change-case
konecty:delayed-task
konecty:mongo-counter
konecty:multiple-instances-status
konecty:nrr
konecty:user-presence
chrismbeckett:toastr
dispatch:run-as-user
francocatena:status
jalik:ufs
jalik:ufs-gridfs
jparker:gravatar
kadira:blaze-layout
kadira:flow-router
kevohagan:sweetalert
meteorhacks:kadira
mizzao:autocomplete
mizzao:timesync
momentjs:moment
monbro:mongodb-mapreduce-aggregation
mrt:reactive-store
mystor:device-detection
nimble:restivus
nooitaf:colors
pauli:accounts-linkedin
percolate:migrations
percolate:synced-cron
raix:handlebar-helpers
raix:push@2.6.13-rc.1
raix:ui-dropped-event
steffo:meteor-accounts-saml
tap:i18n
tmeasday:crypto-md5
tmeasday:errors
todda00:friendly-slugs
underscorestring:underscore.string
yasaricli:slugify
yasinuslu:blaze-meta
rocketchat:authorization
perak:codemirror
standard-minifiers
meteor-base
mobile-experience
mongo
blaze-html-templates
session
tracker
logging
reload
random
ejson
spacebars
check
rocketchat:github-enterprise
rocketchat:chatops
# sanjo:jasmine@0.20.2
# velocity:html-reporter
cd ../../build
FILENAME=rocket.chat-`cat version.txt`.tgz
mv Rocket.Chat.tar.gz $FILENAME
ln -s $FILENAME rocket.chat-v.latest.tgz
{
"name": "setbuildinfo",
"version": "1.0.0",
"description": "Set the buildinfo.txt resource",
"main": "setbuildinfo.js",
"scripts": {
"start": "node setbuildinfo.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"line-by-line": "^0.1.4",
"mkdirp": "^0.5.1"
}
}
var BUILD_INFO_PATH = '../public/buildinfo/buildinfo.txt';
var PACKAGES_PATH = '../.meteor/packages';
var BUILD_PATH = '../../build';
var LineByLineReader = require('line-by-line'),
mkdirp = require('mkdirp'),
fs = require('fs'),
lr = new LineByLineReader(BUILD_INFO_PATH);
var firstline = "";
if (process.env.TRAVIS_JOB_ID) {
var transformVersion = function (firstline) {
var versions = firstline.split(".");
return versions[0] + '.' + versions[1] + '.' + process.env.TRAVIS_JOB_ID + '\n';
};
lr.on('error', function (err) {
// 'err' contains error object
});
lr.on('line', function (line) {
if (firstline == "")
firstline = line;
});
lr.on('end', function () {
var packages = fs.readFileSync(PACKAGES_PATH);
var verinfo = transformVersion(firstline);
var content = verinfo + packages;
mkdirp.sync(BUILD_PATH);
fs.writeFileSync(BUILD_PATH + "/version.txt", verinfo);
fs.writeFileSync(BUILD_INFO_PATH, content);
});
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment