Skip to content

Commit b7807df

Browse files
authored
Merge pull request #91 from MaRDI4NFDI/shallow-clone
Speed up extension cloning
2 parents bd4a887 + c5ab7db commit b7807df

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,26 +61,27 @@ bash clone-extension.sh Thanks ${WMF_BRANCH};\
6161
bash clone-extension.sh LinkedWiki ${REL_BRANCH}
6262

6363
# clone extensions not officially distributed by mediawiki
64-
RUN git clone https://github.com/ProfessionalWiki/WikibaseLocalMedia.git WikibaseLocalMedia &&\
64+
RUN git clone --depth=1 https://github.com/ProfessionalWiki/WikibaseLocalMedia.git WikibaseLocalMedia &&\
6565
rm -rf WikibaseLocalMedia/.git
6666

67-
RUN git clone https://github.com/ProfessionalWiki/WikibaseExport.git WikibaseExport &&\
67+
RUN git clone --depth=1 https://github.com/ProfessionalWiki/WikibaseExport.git WikibaseExport &&\
6868
rm -rf WikibaseExport/.git
6969

70-
RUN git clone https://github.com/MaRDI4NFDI/MatomoAnalytics.git MatomoAnalytics &&\
70+
RUN git clone --depth=1 https://github.com/MaRDI4NFDI/MatomoAnalytics.git MatomoAnalytics &&\
7171
rm -rf MatomoAnalytics/.git
7272

73-
RUN git clone https://github.com/ProfessionalWiki/ExternalContent.git ExternalContent &&\
73+
RUN git clone --depth=1 https://github.com/ProfessionalWiki/ExternalContent.git ExternalContent &&\
7474
rm -rf ExternalContent/.git
7575

76-
RUN git clone https://github.com/SemanticMediaWiki/SemanticDrilldown.git SemanticDrilldown &&\
76+
RUN git clone --depth=1 https://github.com/SemanticMediaWiki/SemanticDrilldown.git SemanticDrilldown &&\
7777
rm -rf SemanticDrilldown/.git
7878

79-
RUN git clone https://github.com/wikimedia/mediawiki -b ${WMF_BRANCH} &&\
79+
# clone core
80+
RUN git clone --depth=1 https://github.com/wikimedia/mediawiki -b ${WMF_BRANCH} &&\
8081
rm -rf mediawiki/.git
8182

8283
# Clone Vector Skin (not included in the mediawiki repository)
83-
RUN git clone https://github.com/wikimedia/mediawiki-skins-Vector -b ${WMF_BRANCH} Vector &&\
84+
RUN git clone --depth=1 https://github.com/wikimedia/mediawiki-skins-Vector -b ${WMF_BRANCH} Vector &&\
8485
rm -rf Vector/.git
8586

8687

clone-extension.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ BRANCH=$2
66
#git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/$EXTENSiON -b ${BRANCH} ${EXTENSION} \
77
#|| git clone https://github.com/wikimedia/mediawiki-extensions-${EXTENSION}.git -b ${BRANCH} ${EXTENSION}
88

9-
git clone --recurse-submodules https://github.com/wikimedia/mediawiki-extensions-${EXTENSION}.git -b ${BRANCH} ${EXTENSION}
9+
git clone --depth=1 --recurse-submodules https://github.com/wikimedia/mediawiki-extensions-${EXTENSION}.git -b ${BRANCH} ${EXTENSION}
1010
rm -rf ${EXTENSION}/.git

0 commit comments

Comments
 (0)