Skip to content

Commit

Permalink
Generate version-based identifier for data when autogenerating config
Browse files Browse the repository at this point in the history
  • Loading branch information
petrsloup committed Jan 17, 2017
1 parent 58ccc54 commit 63482a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,12 @@ var startWithMBTiles = function(mbtilesFile) {

if (info.format == 'pbf' &&
info.name.toLowerCase().indexOf('openmaptiles') > -1) {
config['data']['openmaptiles'] = {
var omtV = (info.version || '').split('.');

config['data']['v' + omtV[0]] = {
"mbtiles": path.basename(mbtilesFile)
};

var omtV = (info.version || '').split('.');

var styles = fs.readdirSync(path.resolve(styleDir, 'styles'));
for (var i = 0; i < styles.length; i++) {
Expand Down

0 comments on commit 63482a2

Please sign in to comment.