加入3.5 修复水印
This commit is contained in:
1 parent
ef01cdd6ee
commit
e82a62a9ad
19 files changed
+5894
-38
No files matched your search
@@ -4,17 +4,18 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { execFileSync } = require('child_process');
|
||||
const destination = path.resolve(process.argv[2] || path.join(__dirname, '.fixtures'));
|
||||
if (process.argv[3] === '3.4') {
|
||||
const revision = 'ef5013143178918ddfc7cabfbddeae7aec7cf84e';
|
||||
if (['3.4', '3.5'].includes(process.argv[3])) {
|
||||
const version = process.argv[3];
|
||||
const revision = version === '3.4' ? 'ef5013143178918ddfc7cabfbddeae7aec7cf84e' : '2cd9467d2736b7f3a0b81382f117c73823bfb44b';
|
||||
for (const name of ['spineboy', 'goblins', 'vine', 'stretchyman', 'tank', 'raptor']) {
|
||||
const directory = path.join(destination, '3.4', name);
|
||||
const directory = path.join(destination, version, name);
|
||||
fs.mkdirSync(directory, { recursive: true });
|
||||
const variants = name === 'spineboy' ? [name, name + '-mesh', name + '-hover'] : name === 'goblins' ? [name, name + '-mesh'] : [name];
|
||||
for (const file of [...variants.flatMap(v => [v + '.json', v + '.skel']), name + '.atlas', name + '.png']) {
|
||||
const url = `https://raw.githubusercontent.com/EsotericSoftware/spine-runtimes/${revision}/examples/${name}/export/${file}`;
|
||||
execFileSync('curl', ['--http1.1', '-LfsS', '--retry', '2', '--max-time', '60', url, '-o', path.join(directory, file)]);
|
||||
}
|
||||
console.log('3.4 / ' + name);
|
||||
console.log(version + ' / ' + name);
|
||||
}
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user