Move pdf-reader submodule to reader
This commit is contained in:
parent
4ac3128b17
commit
838a3090fd
5 changed files with 11 additions and 11 deletions
4
.gitmodules
vendored
4
.gitmodules
vendored
|
@ -30,8 +30,8 @@
|
|||
path = resource/SingleFile
|
||||
url = https://github.com/gildas-lormeau/SingleFile.git
|
||||
[submodule "pdf-reader"]
|
||||
path = pdf-reader
|
||||
url = https://github.com/zotero/pdf-reader.git
|
||||
path = reader
|
||||
url = https://github.com/zotero/reader.git
|
||||
branch = master
|
||||
[submodule "pdf-worker"]
|
||||
path = pdf-worker
|
||||
|
|
|
@ -17,7 +17,7 @@ if (require.main === module) {
|
|||
try {
|
||||
await getClean(path.join(ROOT, 'build'));
|
||||
await getClean(path.join(ROOT, '.signatures.json'));
|
||||
await getClean(path.join(ROOT, 'pdf-reader/build'));
|
||||
await getClean(path.join(ROOT, 'reader/build'));
|
||||
await getClean(path.join(ROOT, 'pdf-worker/build'));
|
||||
await getClean(path.join(ROOT, 'note-editor/build'));
|
||||
} catch (err) {
|
||||
|
|
|
@ -10,17 +10,17 @@ const { buildsURL } = require('./config');
|
|||
async function getPDFReader(signatures) {
|
||||
const t1 = Date.now();
|
||||
|
||||
const modulePath = path.join(__dirname, '..', 'pdf-reader');
|
||||
const modulePath = path.join(__dirname, '..', 'reader');
|
||||
|
||||
const { stdout } = await exec('git rev-parse HEAD', { cwd: modulePath });
|
||||
const hash = stdout.trim();
|
||||
|
||||
if (!('pdf-reader' in signatures) || signatures['pdf-reader'].hash !== hash) {
|
||||
const targetDir = path.join(__dirname, '..', 'build', 'resource', 'pdf-reader');
|
||||
if (!('reader' in signatures) || signatures['reader'].hash !== hash) {
|
||||
const targetDir = path.join(__dirname, '..', 'build', 'resource', 'reader');
|
||||
try {
|
||||
const filename = hash + '.zip';
|
||||
const tmpDir = path.join(__dirname, '..', 'tmp', 'builds', 'pdf-reader');
|
||||
const url = buildsURL + 'client-pdf-reader/' + filename;
|
||||
const tmpDir = path.join(__dirname, '..', 'tmp', 'builds', 'reader');
|
||||
const url = buildsURL + 'client-reader/' + filename;
|
||||
|
||||
await fs.remove(targetDir);
|
||||
await fs.ensureDir(targetDir);
|
||||
|
@ -40,13 +40,13 @@ async function getPDFReader(signatures) {
|
|||
await exec('npm run build', { cwd: modulePath });
|
||||
await fs.copy(path.join(modulePath, 'build', 'zotero'), targetDir);
|
||||
}
|
||||
signatures['pdf-reader'] = { hash };
|
||||
signatures['reader'] = { hash };
|
||||
}
|
||||
|
||||
const t2 = Date.now();
|
||||
|
||||
return {
|
||||
action: 'pdf-reader',
|
||||
action: 'reader',
|
||||
count: 1,
|
||||
totalCount: 1,
|
||||
processingTime: t2 - t1
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit f8ec5007a2982ce552bb6d9e0a9101700299dd46
|
1
reader
Submodule
1
reader
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit e4e8f9ff0fcd1a63887a8a6fce35aace5dbb4488
|
Loading…
Reference in a new issue