This repository has been archived by the owner on Nov 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release 3.0.0
- Loading branch information
Showing
21 changed files
with
292 additions
and
195 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 |
---|---|---|
|
@@ -17,3 +17,4 @@ __pycache__/ | |
# due to using tox and pytest | ||
.tox | ||
.cache | ||
package-lock.json |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/** | ||
* Created by sam on 13.11.2016. | ||
*/ | ||
|
||
const spawnSync = require('child_process').spawnSync; | ||
const fs = require('fs'); | ||
|
||
function gitHead(cwd) { | ||
const r = spawnSync('git', ['rev-parse', '--verify', 'HEAD'], { | ||
cwd: cwd | ||
}); | ||
if (!r.stdout) { | ||
console.error(cwd, r.error); | ||
return 'error'; | ||
} | ||
return r.stdout.toString().trim(); | ||
} | ||
|
||
function resolvePlugin(repo, version) { | ||
if (fs.lstatSync('.git').isDirectory() && repo) { | ||
if (repo.endsWith('.git')) { | ||
repo = repo.slice(0, repo.length - 4); | ||
return repo + '/commit/' + gitHead('.'); | ||
} | ||
} | ||
// not a git repo | ||
return version; | ||
} | ||
|
||
function toVersion(v) { | ||
const now = new Date().toISOString(); | ||
// %Y%m%d-%H%M%S | ||
const fmt = now | ||
.replace(/T/, ' ') | ||
.replace(/\..+/, '') | ||
.replace(/[-:]/, '') | ||
.replace(' ', '-'); | ||
return v.replace('SNAPSHOT', fmt); | ||
} | ||
|
||
function _main() { | ||
const pkg = require('./package.json'); | ||
const name = pkg.name; | ||
const version = toVersion(pkg.version); | ||
const resolved = resolvePlugin((pkg.repository || {}).url, version); | ||
|
||
const buildInfo = { | ||
name, | ||
version, | ||
resolved, | ||
description: pkg.description, | ||
homepage: pkg.homepage, | ||
repository: (pkg.repository || {}).url | ||
}; | ||
|
||
const l = ('build/source/' + name.toLowerCase()).split('/'); | ||
l.forEach((_, i) => { | ||
const path = l.slice(0, i + 1).join('/'); | ||
if (!fs.existsSync(path)) { | ||
fs.mkdirSync(path); | ||
} | ||
}); | ||
|
||
fs.writeFileSync('build/source/' + name.toLowerCase() + '/buildInfo.json', JSON.stringify(buildInfo, null, ' ')); | ||
} | ||
|
||
if (require.main === module) { | ||
_main(); | ||
} |
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 @@ | ||
version: '2.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
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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
-e git+https://github.com/phovea/phovea_server.git@develop#egg=phovea_server | ||
enum==0.4.6 | ||
phovea_server>=4.0.0,<5.0.0 | ||
sklearn==0.0 |
Oops, something went wrong.