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
|
path = resource/SingleFile
|
||||||
url = https://github.com/gildas-lormeau/SingleFile.git
|
url = https://github.com/gildas-lormeau/SingleFile.git
|
||||||
[submodule "pdf-reader"]
|
[submodule "pdf-reader"]
|
||||||
path = pdf-reader
|
path = reader
|
||||||
url = https://github.com/zotero/pdf-reader.git
|
url = https://github.com/zotero/reader.git
|
||||||
branch = master
|
branch = master
|
||||||
[submodule "pdf-worker"]
|
[submodule "pdf-worker"]
|
||||||
path = pdf-worker
|
path = pdf-worker
|
||||||
|
|
|
@ -17,7 +17,7 @@ if (require.main === module) {
|
||||||
try {
|
try {
|
||||||
await getClean(path.join(ROOT, 'build'));
|
await getClean(path.join(ROOT, 'build'));
|
||||||
await getClean(path.join(ROOT, '.signatures.json'));
|
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, 'pdf-worker/build'));
|
||||||
await getClean(path.join(ROOT, 'note-editor/build'));
|
await getClean(path.join(ROOT, 'note-editor/build'));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
@ -10,17 +10,17 @@ const { buildsURL } = require('./config');
|
||||||
async function getPDFReader(signatures) {
|
async function getPDFReader(signatures) {
|
||||||
const t1 = Date.now();
|
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 { stdout } = await exec('git rev-parse HEAD', { cwd: modulePath });
|
||||||
const hash = stdout.trim();
|
const hash = stdout.trim();
|
||||||
|
|
||||||
if (!('pdf-reader' in signatures) || signatures['pdf-reader'].hash !== hash) {
|
if (!('reader' in signatures) || signatures['reader'].hash !== hash) {
|
||||||
const targetDir = path.join(__dirname, '..', 'build', 'resource', 'pdf-reader');
|
const targetDir = path.join(__dirname, '..', 'build', 'resource', 'reader');
|
||||||
try {
|
try {
|
||||||
const filename = hash + '.zip';
|
const filename = hash + '.zip';
|
||||||
const tmpDir = path.join(__dirname, '..', 'tmp', 'builds', 'pdf-reader');
|
const tmpDir = path.join(__dirname, '..', 'tmp', 'builds', 'reader');
|
||||||
const url = buildsURL + 'client-pdf-reader/' + filename;
|
const url = buildsURL + 'client-reader/' + filename;
|
||||||
|
|
||||||
await fs.remove(targetDir);
|
await fs.remove(targetDir);
|
||||||
await fs.ensureDir(targetDir);
|
await fs.ensureDir(targetDir);
|
||||||
|
@ -40,13 +40,13 @@ async function getPDFReader(signatures) {
|
||||||
await exec('npm run build', { cwd: modulePath });
|
await exec('npm run build', { cwd: modulePath });
|
||||||
await fs.copy(path.join(modulePath, 'build', 'zotero'), targetDir);
|
await fs.copy(path.join(modulePath, 'build', 'zotero'), targetDir);
|
||||||
}
|
}
|
||||||
signatures['pdf-reader'] = { hash };
|
signatures['reader'] = { hash };
|
||||||
}
|
}
|
||||||
|
|
||||||
const t2 = Date.now();
|
const t2 = Date.now();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
action: 'pdf-reader',
|
action: 'reader',
|
||||||
count: 1,
|
count: 1,
|
||||||
totalCount: 1,
|
totalCount: 1,
|
||||||
processingTime: t2 - t1
|
processingTime: t2 - t1
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit f8ec5007a2982ce552bb6d9e0a9101700299dd46
|
|
1
reader
Submodule
1
reader
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit e4e8f9ff0fcd1a63887a8a6fce35aace5dbb4488
|
Loading…
Add table
Add a link
Reference in a new issue