From 3d53cfa4b4a9f5dbab5fc3496092f8374fcfbee7 Mon Sep 17 00:00:00 2001 From: esoe Date: Sat, 12 Nov 2022 19:19:37 +0300 Subject: [PATCH] live works --- out/repos | 2 +- out/unzip/molokoin/molokoin-client/index.html | 5 +- out/zip/molokoin-client-master.zip | Bin 2209 -> 2141 bytes .../molokoin/sourceListener/GitListener.java | 62 ++++++++++-------- .../sourceListener/git/GitServiceFace.java | 2 +- .../sourceListener/net/NetService.java | 5 +- .../molokoin/sourceListener/GitListener.class | Bin 5473 -> 6002 bytes .../sourceListener/git/GitServiceFace.class | Bin 5608 -> 5608 bytes .../sourceListener/net/NetService.class | Bin 2687 -> 2780 bytes target/dependencies.txt | 14 ++++ 10 files changed, 57 insertions(+), 33 deletions(-) create mode 100644 target/dependencies.txt diff --git a/out/repos b/out/repos index d7baa10..e5343f3 160000 --- a/out/repos +++ b/out/repos @@ -1 +1 @@ -Subproject commit d7baa10c82b3cca734c172b3428850454f3c6c70 +Subproject commit e5343f318ddfb5f8a767782221b46fd2035684ca diff --git a/out/unzip/molokoin/molokoin-client/index.html b/out/unzip/molokoin/molokoin-client/index.html index 744949d..59c08fa 100644 --- a/out/unzip/molokoin/molokoin-client/index.html +++ b/out/unzip/molokoin/molokoin-client/index.html @@ -9,14 +9,13 @@
- molokoin.ru/ добавить картинку и кнопку авторизации + molokoin.ru
-
+ diff --git a/out/zip/molokoin-client-master.zip b/out/zip/molokoin-client-master.zip index 61ce159969f3da12e8d70a73511affff95a8325f..e2b5392542c8fd264adb9d5114ef78189ddfd488 100644 GIT binary patch delta 814 zcmZ1|cvpZgz?+$civa|TXXS)W^XZRn z38{<>3=f$m>#(TSgXE?Lo%TDTAaZy15B?LkruF5ivCWc@@6?XXSme#NF4&EWkCK(I!_I}mBx5H>(;kTKyUR~QE zE_9GH&L=gt<&wCNE?&7J)=MBNGDyA~8&U!Dfyo0g3s^#_SGqs5&4LNGV_Ng1bCww3UM5S z6lUOras`0&E>;GH-29yU?EK6;-Q=9i)Vvb?tYZDp5LO08RLdYfX<@9pB?#09!ctI^ zfT<4%zCcWx?93tK3DL>Q1`=lj!b?CUZa|&}L#nBt=G>#(TSgXE?LpUt~sAh1vQBj2%fq2&dUp&z|gh;$0eL~-`z8Rguu+Sa+8 zvwC&ck+M^`mU+s`r6h_rsJH)mUB@yzbrj8oFN`Vq`-pBl267cwnK+wtv+%tPTWC6;rm*z7#~<|nQ3 zYJX6`V;HM!U;MPnJ@VBw(R#O5g`X4J(#+3%NSn+dR)6I858Zo5-WOhu{~jN?r`P;% zXuYiYN4i@0?jh-9G83D=Dky@J^Ye=Hb5iwk^3yex3QLtV1H2iT7#I*KYH}Ex zu?Qqdp-IeTGe?tvq^rp<*c{|gbwDJL(w7@M4nup{rI=aS7$ys{iI|0kure^B8U%5D z3uE0aL12mpVJQYqP~v9*rduGe2WwSug6IMo1O#kAcnK&y5y;bEFf&L^Ni;CFFfuna hPBb$}GPE#GOHDShNHaG!H%hiNHA^ zipEntries = file.entries(); while (zipEntries.hasMoreElements()){ ZipEntry zipEntry = zipEntries.nextElement(); + System.out.println("... " + zipEntry.getName() + " ..."); File newFile = new File(opt.getUnzipPath(), zipEntry.getName()); newFile.getParentFile().mkdirs(); if (!zipEntry.isDirectory()){ @@ -88,6 +116,8 @@ public class GitListener { } } } + System.out.println("Файлы размещены в директории: " + opt.getUnzipPath()); + System.out.println("Распаковка архива завершена."); } } @@ -99,7 +129,7 @@ public class GitListener { /** * инициализируем git: открываем существующий репозиратий или клонируем новый с удаленного репозитария */ - Boolean isRepoExists = false; + Boolean isRepoExists = true; if(isRepoExists){ //открываем существующий репозиторий git = GitServiceFace.open(ear.opt.getGitLocalPath()); @@ -107,28 +137,8 @@ public class GitListener { //клонируем репозитарий git = GitServiceFace.copy(ear.getOpt().getGitLink(), ear.getOpt().getGitLocalPath()); } + ear.live(git); - Boolean isChanged = GitServiceFace.isChenged(git); - //если удаленная версия отличается от локальной, обновляем локальный репозитарий - if (isChanged){ - //забираем обновления с удаленного репозитария - System.out.println("забираем обновления с удаленного репозитария ..."); - CheckoutCommand checkout = git.checkout(); - checkout.setName("master"); - checkout.call(); - PullCommand pullCmd = git.pull(); - pullCmd.call(); - git.close(); - } - if (isChanged){ - //скачиваем и извлекаем архив репозитория - try { - NetService.download(ear.opt.getZipLink(), ear.opt.getDownloadPath()); - ear.extract(); - } catch (IOException e) { - System.out.println(e.getMessage()); - } - } } } diff --git a/src/main/java/ru/molokoin/sourceListener/git/GitServiceFace.java b/src/main/java/ru/molokoin/sourceListener/git/GitServiceFace.java index 6cbcfaf..9d291a5 100644 --- a/src/main/java/ru/molokoin/sourceListener/git/GitServiceFace.java +++ b/src/main/java/ru/molokoin/sourceListener/git/GitServiceFace.java @@ -118,7 +118,7 @@ public interface GitServiceFace { System.out.println("Время последнего комита в локальном репозитарии: " + old); //получаем сведения об удаленных комитах - System.out.println("получаем сведения об удаленных комитах ..."); + System.out.println("Получаем сведения об удаленных комитах ..."); System.out.println("Текущая ветка удаленного репозитария: " + git.fetch().getRemote()); git.fetch().call(); diff --git a/src/main/java/ru/molokoin/sourceListener/net/NetService.java b/src/main/java/ru/molokoin/sourceListener/net/NetService.java index 10a18be..3577dd5 100644 --- a/src/main/java/ru/molokoin/sourceListener/net/NetService.java +++ b/src/main/java/ru/molokoin/sourceListener/net/NetService.java @@ -21,9 +21,10 @@ public class NetService { try { HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofFileDownload(Path.of(localPath), StandardOpenOption.CREATE, StandardOpenOption.WRITE)); - System.out.println(response.statusCode()); - System.out.println(response.headers()); + System.out.println("response.statusCode() : " + response.statusCode()); + //System.out.println(response.headers()); Path path = response.body(); + System.out.println("Загрузка завершена, файл размещен на локальном устройстве: "); System.out.println("Path = " + path); } catch (Exception e) { System.out.println(e.getMessage()); diff --git a/target/classes/ru/molokoin/sourceListener/GitListener.class b/target/classes/ru/molokoin/sourceListener/GitListener.class index 19c9fee5f847d9a41e1fbf9a9b268158bcb8b5dc..da312894cce69f2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3Q24WZs!>T-L&QVx1%F}lR)MGN8{S5mjT566XL|HyKjEY90RY`}A zMMEz^t8Szaq3TDWg{m{SD|BpxZn_0~X$S!8@d*6^ML2;|PCd@zth3ARtiW_yuO?|D z0*F%Uo2a#GsKRU0By6T*3%OcHgK<52XkhQ6{U&TA=bP{X8JxhiIFB}`y(^)Tv+>FH z7SUsT2nVQP0UXA|I7mqaaX&tfFF>IHw^CY<5-SF(j{aZ38F2r%pGhn2Dl+nV&r|ANd4)6`w_{QJ6lNCwFoO!} z{*S{-Kq>rL2ET9s`s?|B2gS>QT)f!D*2ZS;mMT!8H~C}Ow-3F=c1B1jQ5Y=TWM!DAs?%4NW>Nubp%5u$3`CG{|18z7tH_w diff --git a/target/classes/ru/molokoin/sourceListener/git/GitServiceFace.class b/target/classes/ru/molokoin/sourceListener/git/GitServiceFace.class index ac154e61fd4a85b3df58ff0f4fc86f7cc996c41a..5d995efcd3e0873621f739cc4f65f4c0693b5e2a 100644 GIT binary patch delta 14 VcmaE%{X%<#7B}Pk&Dz|1xd1Kc1zZ3C delta 14 VcmaE%{X%<#7B}Pm&Dz|1xd1My1$+Pi diff --git a/target/classes/ru/molokoin/sourceListener/net/NetService.class b/target/classes/ru/molokoin/sourceListener/net/NetService.class index 14b8c6c7dc2d68e04a413c1af0e7bb3c73b03996..d0aa572420473cf2226f1143bb7ad0a60799cb3e 100644 GIT binary patch delta 760 zcmYLHOHUI~6#i~IooQiW5K(!FLo|dYXjeupG4TteWTj|uLc-ZLlYeB6By%mDwncc}h)5&cb42{#!ExL3eP0b%hTW%z=9(qh81Y2r6I1;FfxXNu#6XY z2^V#m!Yj(TaRyf~jTzELaFn{w(M8Hqmn`OqTcET`$vxL=Vit*Mg6qOAc_js1)n~tg k!(a;1D)n9>hYN4;mav(=aE!EN*@t&@0aggl6XxLi1Mi{RtN;K2 delta 612 zcmZ9JOKTHh6o#KK$z*bwMKxBNST&%F1eAaXYD1wSLIXl;W1~?Uoi?||n8svMW7O7L z>-|#4r5ji7geXK*5I1gI>(0O6UuZqk?1T@_{W&k^`!l$)ZQ$qnmv6vfUhB9N@wK<{ z?$IBfV30|sbWSNEcGnk)8l*X`2sACzYBi59RSES?IG;jGRXdtDofWjUwN>y7!E zRjnyJu~aE1?mc~S+5sr zdHc8bpsz^7powMw()NWiEILA}0ortQt}8;e@`W^m8(1G>`ifF(_IuwO{|q`_Ioqn8 z_9v&qp3h7udQ5*Hl!6P2*m<4TXKJzDP=81ZZl^|&T+ z7sYm3vc7Hq^(U535N3)9Id)2Rm=3#GVGlvsJuVtV0XMlN*726aldE%=Wp3jVQk^>z zxjDip_qZ>$96N-tDyQlQR_eiD "junit:junit:jar:4.12:test" ; + "ru.molokoin:sourceListener:jar:1.0" -> "com.fasterxml.jackson.core:jackson-databind:jar:2.14.0:compile" ; + "ru.molokoin:sourceListener:jar:1.0" -> "org.eclipse.jgit:org.eclipse.jgit:jar:6.3.0.202209071007-r:compile" ; + "ru.molokoin:sourceListener:jar:1.0" -> "org.slf4j:slf4j-api:jar:1.7.30:compile" ; + "ru.molokoin:sourceListener:jar:1.0" -> "org.slf4j:slf4j-simple:jar:1.7.30:compile" ; + "ru.molokoin:sourceListener:jar:1.0" -> "org.slf4j:slf4j-log4j12:jar:1.7.30:compile" ; + "ru.molokoin:sourceListener:jar:1.0" -> "org.apache.logging.log4j:log4j:pom:2.8.2:compile" ; + "junit:junit:jar:4.12:test" -> "org.hamcrest:hamcrest-core:jar:1.3:test" ; + "com.fasterxml.jackson.core:jackson-databind:jar:2.14.0:compile" -> "com.fasterxml.jackson.core:jackson-annotations:jar:2.14.0:compile" ; + "com.fasterxml.jackson.core:jackson-databind:jar:2.14.0:compile" -> "com.fasterxml.jackson.core:jackson-core:jar:2.14.0:compile" ; + "org.eclipse.jgit:org.eclipse.jgit:jar:6.3.0.202209071007-r:compile" -> "com.googlecode.javaewah:JavaEWAH:jar:1.1.13:compile" ; + "org.slf4j:slf4j-log4j12:jar:1.7.30:compile" -> "log4j:log4j:jar:1.2.17:compile" ; + } \ No newline at end of file