...
 
Commits (2)
......@@ -6,6 +6,7 @@
|-----------|------------------------------------------------------------------------------------------------------------------------------------|
| master | Approved code ready to merged into the next stable release. All tests should pass and be in a 'ready' state |
| stable/* | Stable builds, inherited from `release/*` branches. Fastlane automatically deploys these builds. |
| test/* | Release candidate builds, inherited from `release/*` branches. Fastlane automatically deploys these builds. |
| release/* | WIP builds. Run `fastlane run increment_version_number` upon creating the branch. |
| feat/* | New branches should be made for each Gitlab issue. Merge requests should be opened pointing towards the respective release branch. |
......@@ -54,5 +55,17 @@ Run the tests
You can use -c ios.sim.release for e2e test a production build
### Custom Release
Once the file is generated in the CI download the apk and run:
`yarn release-json path/file.apk`
This will update the release.json with this version data
Note: You have to update the change-log for the version!
Upload the file to s3 and that is it.
### _Copyright Minds 2018_
......@@ -13,7 +13,8 @@
"test": "jest",
"locale": "ts-node tasks/poeditor.js",
"preinstall": "git config core.hooksPath .githooks",
"postinstall": "jetify"
"postinstall": "jetify",
"release-json": "node tasks/generate_release_json.js"
},
"dependencies": {
"@hawkingnetwork/node-libs-react-native": "^1.0.10",
......
{
"versions": [
{
"version": "3.14.0",
"timestamp": 1576783681,
"href": "https://cdn-assets.minds.com/android/minds-3_14_0.apk",
"sourceHref": "https://gitlab.com/minds/mobile-native/commits/v3.14.0",
"changelog": [
"Updated translations",
"Slovak added",
"Bug Fixes"
],
"unstable": false,
"hashes": [
{
"type": "md5",
"value": "51752323a92a4a8199f2f8d716e99f2c"
},
{
"type": "sha256",
"value": "476b1f623dc8d6e6d5e86e0d4c3c865a872a3b2958ad57034e944cb5d8477064"
},
{
"type": "sha512",
"value": "f57d69ae5f25394fdeb40fbdae48001712780302c02f899a6cf9d5c481ecec59eaf8381ae0f3a8738b6cbb614a062e9fd9ad1ec1af3850fcecb3051eaac3a842"
}
]
},
{
"version": "3.12.1",
"timestamp": 1576077180,
"href": "https://cdn-assets.minds.com/android/minds-3_12_1.apk",
"sourceHref": "https://gitlab.com/minds/mobile-native/commits/v3.12.1",
"changelog": [
"Bug Fixes"
],
"unstable": false,
"hashes": [
{
"type": "md5",
"value": "5113756e870324c67ce8fec8787653a7"
},
{
"type": "sha256",
"value": "feae8d372c93da18103e268a4bd192c7fd03b94f3dee8deaeb15f9442c4c7742"
},
{
"type": "sha512",
"value": "66f465155f45a837fedafa9918d6f9bcaba64e272b9d33720ae379f714ab25b3d631f0d5ff455985cc0ca4b417b8e7f054db4c548e1241cbf6655e277434043c"
}
]
},
{
"version": "3.12.0",
"timestamp": 1575340091,
"href": "https://cdn-assets.minds.com/android/minds-3_12_0.apk",
"sourceHref": "https://gitlab.com/minds/mobile-native/commits/v3.12.0",
"changelog": [
"React Native updated v0.61.4",
"Code clean up and performance improvements",
"Jitsi SDK updated",
"Fixed push notification router for iOS",
"New gathering screen",
"Bug Fixes"
],
"unstable": false,
"hashes": [
{
"type": "md5",
"value": "5f8ec4ec9b893f12505bd5e3f7392713"
},
{
"type": "sha256",
"value": "2b94fccf353c107ce1db8d74fcceec48f4de88176572fff1a69b66dbab949699"
},
{
"type": "sha512",
"value": "365a7ff04d301300cbd31d36598ce35032dd71fea74591781cb5987cfb375d80d93973e90f4efd9342ccd6546af6f1fe0be5caecac175e292fcf7cdcaec37253"
}
]
},
{
"version": "3.10.1",
"timestamp": 1569966871,
"href": "https://cdn-assets.minds.com/android/minds-3_10_1.apk",
"sourceHref": "https://gitlab.com/minds/mobile-native/commits/v3.10.1",
"changelog": [
"Eth and credit card support on wire",
"Post scheduler",
"Bug fixes"
],
"unstable": false,
"hashes": [
{
"type": "md5",
"value": "c7e591eb0b532dc01ad671b12e3f571a"
},
{
"type": "sha256",
"value": "bbb976fedc0ee15569d05b106db2bd8d624f5e18e558a27be53a4d8119e4eb54"
},
{
"type": "sha512",
"value": "6eb5be8849206f45469038ca4380e407915ff4a5bd6f848ac87728dcb9496bdc32454141ca4d91132aab4fc0f93763600e2da3f04acf2d6ee04a41229da35c3f"
}
]
}
]
}
\ No newline at end of file
const filepath = process.argv[2];
const crypto = require('crypto');
const path = require('path');
const fs = require('fs');
const releases = require('../releases.json');
const hash256 = crypto.createHash('sha256');
const hash512 = crypto.createHash('sha512');
const hashmd5 = crypto.createHash('md5');
const input = fs.createReadStream(filepath);
// read version
const gradleProperties = fs.readFileSync('./android/gradle.properties');
let version = gradleProperties.toString().match(/versionName=(.*)/);
if (version) {
version = version[1];
releases.versions.forEach(v => {
if (v.version === version) {
console.log('The version already exist to the json file');
process.exit(1);
}
});
} else {
console.log('Error reading the version');
process.exit(1);
}
const filename = path.basename(filepath);
input.on('readable', () => {
const data = input.read();
if (data) {
hash256.update(data);
hash512.update(data);
hashmd5.update(data);
} else {
const v = {
version: version,
timestamp: (new Date()).timestamp,
href: 'https://cdn-assets.minds.com/mobile/' + filename,
sourceHref: 'https://gitlab.com/minds/mobile-native/commits/v' + version,
changelog: ['Changelog here'],
unstable: false,
hashes: [
{
type: 'md5',
value: hashmd5.digest('hex'),
},
{
type: 'sha256',
value: hash256.digest('hex'),
},
{
type: 'sha512',
value: hash512.digest('hex'),
},
],
};
releases.versions.unshift(v);
fs.writeFileSync('./releases.json', JSON.stringify(releases, null, 2));
}
});