Skip to content

Commit

Permalink
Merge pull request #162 from Esri/chachachanges
Browse files Browse the repository at this point in the history
docs(changelog): fix comparison links and use todays date for each re…
  • Loading branch information
jgravois authored Mar 29, 2018
2 parents 3650bd2 + 27c9f33 commit 29e879d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

### [Unreleased][HEAD]

## [1.1.1] - March 5th 2018

### @esri/arcgis-rest-common-types
Expand Down Expand Up @@ -254,5 +256,5 @@ Initial Public Release
[1.0.2]: https://github.com/Esri/arcgis-rest-js/compare/v1.0.0...v1.0.2 "v1.0.2"
[1.0.3]: https://github.com/Esri/arcgis-rest-js/compare/v1.0.2...v1.0.3 "v1.0.3"
[1.1.0]: https://github.com/Esri/arcgis-rest-js/compare/v1.0.3...v1.1.0 "v1.1.0"
[1.1.1]: https://github.com/Esri/arcgis-rest-js/compare/v1.1.0...1.1.1 "1.1.1"
[HEAD]: https://github.com/Esri/arcgis-rest-js/compare/1.1.1...HEAD "Unreleased Changes"
[1.1.1]: https://github.com/Esri/arcgis-rest-js/compare/v1.1.0...v1.1.1 "1.1.1"
[HEAD]: https://github.com/Esri/arcgis-rest-js/compare/v1.1.1...HEAD "Unreleased Changes"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Esri welcomes contributions from anyone and everyone. Please see our [guidelines

### License

Copyright 2017 Esri
Copyright 2018 Esri

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
12 changes: 6 additions & 6 deletions support/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const nunjucks = require("nunjucks");
const _ = require("lodash");

/**
* The purpose of this file is to parse all commits since hte last release tag
* The purpose of this file is to parse all commits since the last release tag
* v*.*.* and update the contents of CHANGELOG.md to prepare for a new release.
*/

Expand Down Expand Up @@ -74,15 +74,15 @@ function getCommitData(from, to) {
exec(cmd, (err, stdout, stderr) => {
if (err) return reject(err);
if (stderr) return reject(stderr);
const commits = JSON.parse("["+stdout.slice(0, -1).replace(/\\/g, "\\\\")+"]");
const last = _.last(commits);
const date = last ? last.date : new Date();
// order commits from most recent to least recent
const commits = JSON.parse("["+stdout.slice(0, -1).replace(/\\/g, "\\\\")+"]").reverse();
const today = new Date();
resolve({
previousVersion: /v\d\.\d\.\d/.test(from)
? from.replace("v", "")
: from,
version: to === "HEAD" ? getPackageVersion() : to.replace("v", ""),
date: format(date, "MMMM Do YYYY"),
date: format(today, "MMMM Do YYYY"),
commits
});
});
Expand Down Expand Up @@ -356,7 +356,7 @@ getReleases()
})
.then(([pairs, changelog, newVersion]) => {
const links = pairs.map(([from, to]) => {
to = to === "HEAD" ? getPackageVersion() : to;
to = to === "HEAD" ? "v" + getPackageVersion() : to;
return {
ref: to.replace("v", ""),
title: to,
Expand Down

0 comments on commit 29e879d

Please sign in to comment.