Skip to content

Commit 54f5ce3

Browse files
committed
changelogs init
1 parent 0b873de commit 54f5ce3

File tree

18 files changed

+344
-6
lines changed

18 files changed

+344
-6
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ serve: package
5353
catalog: vendor/bundle
5454
@node scripts/catalog.js
5555

56+
.PHONY: changelog
57+
changelog: vendor/bundle
58+
@node scripts/changelog.js
59+
5660
.PHONY: sidenav
5761
sidenav: vendor/bundle
5862
@node scripts/nav.js

package-lock.json

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"glightbox": "^3.0.6",
5353
"htm": "^3.0.4",
5454
"hyperlink": "^4.5.2",
55+
"json-to-pretty-yaml": "^1.2.2",
5556
"preact": "^10.5.12",
5657
"search-insights": "^1.7.1",
5758
"tap-spot": "^1.1.1",

scripts/catalog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ const updateSources = async () => {
292292
})
293293

294294
// Create source catalog yaml file
295-
const options = { noArrayIndent: true };
295+
const options = { noArrayIndent: false };
296296
var todayDate = new Date().toISOString().slice(0,10);
297297
output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
298298
output += "# sources last updated " + todayDate + " \n";

scripts/changelog.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
const axios = require('axios');
2+
const path = require('path');
3+
const fs = require('fs');
4+
const fm = require('front-matter');
5+
const yaml = require('js-yaml');
6+
7+
API_URL = "https://api.github.com/repos/segmentio/"
8+
9+
const getLog = async (url = "") => {
10+
try {
11+
const res = await axios.get(url, {
12+
headers: {
13+
'Content-Type': 'application/json',
14+
}
15+
});
16+
return res.data
17+
} catch (error) {
18+
console.log(error)
19+
}
20+
}
21+
let libraries = ["analytics-android","analytics-ios"]
22+
23+
const updateLog = async(library) => {
24+
25+
let releasesUpdated = []
26+
let url = API_URL+library+'/releases'
27+
const releases = await getLog(url)
28+
releases.forEach(release => {
29+
let updatedRelease = {
30+
version: release.name,
31+
url: release.html_url,
32+
date: release.published_at,
33+
notes: release.body
34+
}
35+
releasesUpdated.push(updatedRelease)
36+
})
37+
38+
const options = { noArrayIndent: true };
39+
var todayDate = new Date().toISOString().slice(0,10);
40+
output = "# AUTOGENERATED FROM GITHUB API. DO NOT EDIT\n"
41+
output += "# Releases last updated " + todayDate + " \n";
42+
output += yaml.safeDump({ releases: releasesUpdated }, options);
43+
fs.writeFileSync(path.resolve(__dirname, `../src/_data/changelogs/${library}.yml`), output);
44+
}
45+
46+
libraries.forEach(library => {
47+
updateLog(library);
48+
});
49+
//updateLog(LIBRARY);
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# AUTOGENERATED FROM GITHUB API. DO NOT EDIT
2+
# Releases last updated 2021-05-04
3+
releases:
4+
- version: 4.9.4
5+
url: 'https://github.com/segmentio/analytics-android/releases/tag/4.9.4'
6+
date: '2021-05-04T00:16:56Z'
7+
notes: "Version 4.9.4 (May 3, 2021)\r\n============================\r\n* [Fix](https://github.com/segmentio/analytics-android/pull/761): Map product_id for a Product\r\n* [Fix](https://github.com/segmentio/analytics-android/pull/767): Safely handle bad URIs when tracking deep links"
8+
- version: 4.9.3
9+
url: 'https://github.com/segmentio/analytics-android/releases/tag/4.9.3'
10+
date: '2021-03-30T00:39:13Z'
11+
notes: "Version 4.9.3 (Mar 29, 2021)\r\n============================\r\n* [Fix](https://github.com/segmentio/analytics-android/pull/755): Check Float NaN and Infinity\r\n* [Fix](https://github.com/segmentio/analytics-android/pull/758): Fix Incorrect Timestamps"
12+
- version: 4.9.2
13+
url: 'https://github.com/segmentio/analytics-android/releases/tag/4.9.2'
14+
date: '2021-03-22T19:13:24Z'
15+
notes: "Version 4.9.2 (Mar 19, 2021)\r\n============================\r\n* [New](https://github.com/segmentio/analytics-android/pull/734): Make new lifecycle methods opt-out\r\n* [New](https://github.com/segmentio/analytics-android/pull/731): Kotlin Demo App\r\n* [New](https://github.com/segmentio/analytics-android/pull/739): Custom apiHost for Segment.IO and support multi-regional Segment\r\n* [Fix](https://github.com/segmentio/analytics-android/pull/750): Add NonNull annotations to params for analytics constructor\r\n* [Fix](https://github.com/segmentio/analytics-android/pull/749): Retry hasPermission in case of failure due to package manager being inactive\r\n* [Fix](https://github.com/segmentio/analytics-android/pull/752): Marshal NaN and other special numbers to 0.0 and not produce malformed JSON"
16+
- version: 4.9.0
17+
url: 'https://github.com/segmentio/analytics-android/releases/tag/4.9.0'
18+
date: '2020-10-16T00:33:56Z'
19+
notes: "Version 4.9.0 (Oct 15, 2020)\r\n============================\r\n* [New](https://github.com/segmentio/analytics-android/pull/707): Remove the ability to natively report attribution information via Segment integrations\r\n* [New](https://github.com/segmentio/analytics-android/pull/727): Edge Function Support\r\n* [New](https://github.com/segmentio/analytics-android/pull/715): Add a Webhook Integration for viewing payloads\r\n* [New](https://github.com/segmentio/analytics-android/pull/728): Enable faster project settings refresh when debugging enabled"
20+
- version: 4.8.2
21+
url: 'https://github.com/segmentio/analytics-android/releases/tag/4.8.2'
22+
date: '2020-07-30T20:07:08Z'
23+
notes: "Version 4.8.2 (Jul 30, 2020)\r\n============================\r\n* [Fix](https://github.com/segmentio/analytics-android/pull/686): Generate timestamps at call site rather than asynchronously"
24+
- version: 4.8.0
25+
url: 'https://github.com/segmentio/analytics-android/releases/tag/4.8.0'
26+
date: '2020-07-13T18:14:35Z'
27+
notes: "Version 4.8.0 (Jul 13, 2020)\r\n============================\r\n\r\n* [Fix](https://github.com/segmentio/analytics-android/pull/668): Fix: Proguard/R8 configuration for createValueMap\r\n* [Fix](https://github.com/segmentio/analytics-android/pull/670): handle RuntimeException when calling `getActivityInfo`\r\n* [New](https://github.com/segmentio/analytics-android/pull/671): Experimental Nanosecond timestamps"
28+
- version: 4.7.1
29+
url: 'https://github.com/segmentio/analytics-android/releases/tag/4.7.1'
30+
date: '2020-06-08T23:32:57Z'
31+
notes: "Version 4.7.1 (Jun 8, 2020)\r\n============================\r\n\r\n* [Fix](https://github.com/segmentio/analytics-android/pull/667): Use AndroidX lifecycle functions for App Fore/Backgrounded\r\n* [Fix](https://github.com/segmentio/analytics-android/pull/666): Fix alias not overridden by cached value\r\n* [Fix](https://github.com/segmentio/analytics-android/pull/663): Catch null intent data"
32+
- version: 4.7.0
33+
url: 'https://github.com/segmentio/analytics-android/releases/tag/4.7.0'
34+
date: '2020-06-01T22:03:42Z'
35+
notes: "Version 4.7.0 (Jun 1, 2020)\r\n============================\r\n\r\n* [New](https://github.com/segmentio/analytics-android/pull/655): Add type to device context\r\n* [Fix](https://github.com/segmentio/analytics-android/pull/665): Prevent Global Context modification for one-time op\r\n* [New](https://github.com/segmentio/analytics-android/pull/664): Add support for Destination Middleware\r\n"
36+
- version: 4.6.0
37+
url: 'https://github.com/segmentio/analytics-android/releases/tag/4.6.0'
38+
date: '2020-05-21T18:17:59Z'
39+
notes: "* [New](https://github.com/segmentio/analytics-android/pull/662): Add DefaultProjectSettings in Analytics.Builder\r\n* [Fix](https://github.com/segmentio/analytics-android/pull/659): Test coverage fix after previous merge to master\r\n* [New](https://github.com/segmentio/analytics-android/pull/658): Update project to AndroidX\r\n* [Fix](https://github.com/segmentio/analytics-android/pull/656): Set build property to String"
40+
- version: 4.5.0
41+
url: 'https://github.com/segmentio/analytics-android/releases/tag/4.5.0'
42+
date: '2020-04-22T19:59:57Z'
43+
notes: "* Promoting 4.5.x to stable release. This includes all changes since 4.3.1.\r\n* [Fix](https://github.com/fubotv/segment-analytics-android/pull/1): Check integration settings for null\r\n"
44+
- version: 4.5.0-beta.2
45+
url: 'https://github.com/segmentio/analytics-android/releases/tag/4.5.0-beta.2'
46+
date: '2020-03-23T17:55:25Z'
47+
notes: " * [New](https://github.com/segmentio/analytics-android/pull/632): Make crypto abstract methods public\r\n * [Fix](https://github.com/segmentio/analytics-android/pull/648): Preserve BUILD and VERSION keys on reset() calls\r\n * [Fix](https://github.com/segmentio/analytics-android/pull/646): Resolves ArrayIndexOutOfBoundsException crash (#586)\r\n * [Fix](https://github.com/segmentio/analytics-android/pull/644): Updated documentation on deep copy and threading\r\n * [Fix](https://github.com/segmentio/analytics-android/pull/642): Double check that input stream is closed\r\n"
48+
- version: 4.5.0-beta.0
49+
url: 'https://github.com/segmentio/analytics-android/releases/tag/4.5.0-beta.0'
50+
date: '2019-07-26T23:30:17Z'
51+
notes: >-
52+
* [New](https://github.com/segmentio/analytics-android/pull/620): Add
53+
Application Open and Application Backgrounded Events
54+
- version: ''
55+
url: 'https://github.com/segmentio/analytics-android/releases/tag/4.3.0'
56+
date: '2017-10-04T06:58:23Z'
57+
notes: "Promoting RC to stable release. This includes all the improvements from 4.3.0-RC1 and 4.3.0-RC2.\r\n"
58+
- version: ''
59+
url: 'https://github.com/segmentio/analytics-android/releases/tag/4.3.0-RC2'
60+
date: '2017-07-28T03:53:05Z'
61+
notes: " * [New](https://github.com/segmentio/analytics-android/pull/536): Look up Advertising ID for Amazon Fire devices.\r\n * [Fix](https://github.com/segmentio/analytics-android/pull/534): Attribution tracking using mobile service should be false by default.\r\n"
62+
- version: ''
63+
url: 'https://github.com/segmentio/analytics-android/releases/tag/4.2.5'
64+
date: '2017-05-26T16:13:11Z'
65+
notes: " * [Fix](https://github.com/segmentio/analytics-android/pull/487/commits/8649050b4b7b74be17fc7b7e4ec0add7362325fd): Using `Properties#putProducts` was stored as an array instead of a list, and not serialized correctly. This caused it to be unusable by Segment and server side integrations. If you're stuck on a previous version for some reason, you can manually store it as a list:\r\n\r\n ```java\r\n List<Product> products = new ArrayList<>();\r\n products.add(new Product(\"foo\", \"bar\", 10));\r\n // add other products to this list.\r\n\r\n Properties properties = new Properties();\r\n properties.put(\"products\", products);\r\n ```"
66+
- version: ''
67+
url: 'https://github.com/segmentio/analytics-android/releases/tag/4.2.6'
68+
date: '2017-05-26T16:13:00Z'
69+
notes: " * [Fix](https://github.com/segmentio/analytics-android/pull/495): Update Cartographer. This fixes an issue where sending custom values sent as arrays would not be serialized correctly.\r\n * [Fix](https://github.com/segmentio/analytics-android/pull/494): Make DateFormat access thread safe. This fixes an issue where generated timestamps could be sometimes be malformed and not conform to the ISO 8601 standard.\r\n"
70+
- version: ''
71+
url: 'https://github.com/segmentio/analytics-android/releases/tag/4.3.0-RC1'
72+
date: '2017-05-26T16:12:27Z'
73+
notes: " * [New](https://github.com/segmentio/analytics-android/pull/515): Add Middlewares.\r\n * [Fix](https://github.com/segmentio/analytics-android/pull/524): Unregister Application lifecycle callbacks on shutdown.\r\n * [Fix](https://github.com/segmentio/analytics-android/pull/499): Record `ms` precision in timestamps.\r\n * [Fix](https://github.com/segmentio/analytics-android/pull/508): Support serialization of Primitive arrays.\r\n"

0 commit comments

Comments
 (0)