-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6938 from RocketChat/test-ci
[NEW] Improve CI/Docker build/release
- Loading branch information
Showing
8 changed files
with
54 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FROM rocketchat/base:4 | ||
|
||
ENV RC_VERSION latest | ||
ENV RC_VERSION 0.56.0-rc.2 | ||
|
||
MAINTAINER buildmaster@rocket.chat | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* eslint object-shorthand: 0, prefer-template: 0 */ | ||
|
||
const path = require('path'); | ||
const fs = require('fs'); | ||
let pkgJson = {}; | ||
|
||
try { | ||
pkgJson = require(path.resolve( | ||
process.cwd(), | ||
'./package.json' | ||
)); | ||
} catch (err) { | ||
console.error('no root package.json found'); | ||
} | ||
|
||
const readline = require('readline'); | ||
|
||
const rl = readline.createInterface({ | ||
input: process.stdin, | ||
output: process.stdout | ||
}); | ||
|
||
const files = [ | ||
'./package.json', | ||
'./.sandstorm/sandstorm-pkgdef.capnp', | ||
'./.travis/snap.sh', | ||
'./.docker/Dockerfile.sh', | ||
'./packages/rocketchat-lib/rocketchat.info' | ||
]; | ||
|
||
console.log('Current version:', pkgJson.version); | ||
rl.question('New version: ', function(version) { | ||
rl.close(); | ||
|
||
version = version.trim(); | ||
|
||
if (version === '') { | ||
return; | ||
} | ||
|
||
console.log('Updating files to version ' + version); | ||
|
||
files.forEach(function(file) { | ||
const data = fs.readFileSync(file, 'utf8'); | ||
|
||
fs.writeFileSync(file, data.replace(pkgJson.version, version), 'utf8'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1 @@ | ||
if [[ $TRAVIS_TAG ]] | ||
then | ||
export ARTIFACT_NAME="$TRAVIS_TAG"; | ||
else | ||
export ARTIFACT_NAME="$TRAVIS_BRANCH"; | ||
fi | ||
export ARTIFACT_NAME="$(meteor npm run version --silent)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters