Compare commits
2 Commits
e2938843b8
...
1fddcd7598
| Author | SHA1 | Date | |
|---|---|---|---|
| 1fddcd7598 | |||
| cff3d36e54 |
@ -33,6 +33,11 @@ function resolveDep(modId, callback) {
|
|||||||
rightVersion = files[i];
|
rightVersion = files[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(rightVersion === undefined) {
|
||||||
|
getData(modId, (mod) => {
|
||||||
|
console.log(`cursemod ${mod.name}: no version for the correct minecraft version and modloader found`);
|
||||||
|
});
|
||||||
|
return;
|
||||||
dep.set(String(modId), {fileId: rightVersion.id, url: rightVersion.downloadUrl, filename: rightVersion.fileName});
|
dep.set(String(modId), {fileId: rightVersion.id, url: rightVersion.downloadUrl, filename: rightVersion.fileName});
|
||||||
rightVersion.dependencies.forEach(mod => {
|
rightVersion.dependencies.forEach(mod => {
|
||||||
if(mod.type !== 3) return;
|
if(mod.type !== 3) return;
|
||||||
|
|||||||
@ -19,6 +19,7 @@ function main () {
|
|||||||
fs.access(repoPath, (err) => {
|
fs.access(repoPath, (err) => {
|
||||||
if(err) {
|
if(err) {
|
||||||
if(err.code !== "ENOENT") throw err;
|
if(err.code !== "ENOENT") throw err;
|
||||||
|
console.log(`cloning git repo ${gitRepo.url}`);
|
||||||
git.clone(gitRepo.url, repoPath, undefined, gitRepo.branch, (err, repo) => {
|
git.clone(gitRepo.url, repoPath, undefined, gitRepo.branch, (err, repo) => {
|
||||||
if(err) throw err;
|
if(err) throw err;
|
||||||
build(repo, repoPath, gitRepo);
|
build(repo, repoPath, gitRepo);
|
||||||
@ -26,6 +27,7 @@ function main () {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let repo = git(repoPath);
|
let repo = git(repoPath);
|
||||||
|
console.log(`pulling git repo ${gitRepo.url}`);
|
||||||
repo.pull(["origin"], gitRepo.branch, (err) => {
|
repo.pull(["origin"], gitRepo.branch, (err) => {
|
||||||
if(err) throw err;
|
if(err) throw err;
|
||||||
build(repo, repoPath, gitRepo);
|
build(repo, repoPath, gitRepo);
|
||||||
@ -53,6 +55,7 @@ function build(repo, repoPath, gitRepo) {
|
|||||||
if(commit.id === newLock.commitId) cbDecrease();
|
if(commit.id === newLock.commitId) cbDecrease();
|
||||||
else {
|
else {
|
||||||
newLock.commitId = commit.id;
|
newLock.commitId = commit.id;
|
||||||
|
console.log(`buidling ${gitRepo.url}`);
|
||||||
childProcess.execFile("gradle", ["build"], {cwd: repoPath}, (err) => {
|
childProcess.execFile("gradle", ["build"], {cwd: repoPath}, (err) => {
|
||||||
if(err) throw err;
|
if(err) throw err;
|
||||||
let buildPath = `${repoPath}/build/libs`;
|
let buildPath = `${repoPath}/build/libs`;
|
||||||
|
|||||||
Reference in New Issue
Block a user