-
Notifications
You must be signed in to change notification settings - Fork 179
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 #868 from radiantearth/dev
1.0.0-beta.2 release
- Loading branch information
Showing
89 changed files
with
711 additions
and
368 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
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,40 @@ | ||
const klaw = require('klaw-sync'); | ||
const path = require('path'); | ||
const fs = require('fs'); | ||
const ghpages = require('gh-pages'); | ||
|
||
function filterFn (item) { | ||
const basename = path.basename(item.path); | ||
return basename === '.' || basename === 'node_modules' || basename[0] !== '.'; | ||
} | ||
|
||
let args = process.argv.slice(2); | ||
let tag = 'dev'; | ||
if (args.length && args[0].trim().length > 0) { | ||
tag = args[0]; | ||
} | ||
|
||
var folder = '.'; | ||
var jsonSchemaFolderPattern = path.sep + 'json-schema' + path.sep; | ||
for (let file of klaw(folder, {filter: filterFn})) { | ||
if (file.path.includes(jsonSchemaFolderPattern) && path.extname(file.path) === '.json') { | ||
let source = file.path; | ||
let target = 'schemas' + path.sep + tag + path.sep + path.relative(folder, file.path); | ||
fs.mkdirSync(path.dirname(target), { recursive: true }); | ||
fs.copyFileSync(source, target); | ||
console.log(target); | ||
} | ||
} | ||
|
||
ghpages.publish('schemas/' + tag, { | ||
src: '**', | ||
dest: tag, | ||
message: 'Publish JSON Schemas [ci skip]', | ||
user: { | ||
name: 'STAC CI', | ||
email: 'ci@stacspec.org' | ||
} | ||
}, error => { | ||
console.error(error ? error : 'Deployed to gh-pages'); | ||
process.exit(error ? 1 : 0); | ||
}); |
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 |
---|---|---|
|
@@ -64,3 +64,6 @@ typings/ | |
# IntelliJ IDEA files | ||
.idea/ | ||
*.iml | ||
|
||
# Folder created when CI puhlishes JSON Schemas | ||
schemas/ |
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
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
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
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
Oops, something went wrong.