File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -78,11 +78,15 @@ $(BUILD_DIR)/etc/systemd:
78
78
@mkdir -p $@
79
79
@cp -r etc/systemd/ $@
80
80
81
+ # We need to copy .git to make git describe work for the docs (docs are built
82
+ # with git version string). pre-commit might also need the .git folder.
83
+ # TODO: only copy over a shallow copy of git repo - we do not need entire history
84
+ # nor all branches
81
85
$(BUILD_DIR ) /etc/gisnav : $(BUILD_DIR ) /etc/gisnav/ros $(BUILD_DIR ) /etc/gisnav/docker $(BUILD_DIR ) /etc/gisnav/docs
82
86
@dest=debian/gisnav/$@ && \
83
87
mkdir -p $@ && \
84
88
touch $(BUILD_DIR ) /COLCON_IGNORE && \
85
- cd ${REPO_ROOT_PATH} ; rsync -av --exclude-from=' .gitignore' Makefile .pre-commit-config.yaml LICENSE.md README.md pyproject.toml $$ dest
89
+ cd ${REPO_ROOT_PATH} ; rsync -av --exclude-from=' .gitignore' Makefile .pre-commit-config.yaml LICENSE.md README.md pyproject.toml .git $$ dest
86
90
87
91
$(BUILD_DIR ) /etc/gisnav/ros :
88
92
@dest=debian/gisnav/$@ && \
@@ -97,8 +101,8 @@ $(BUILD_DIR)/etc/gisnav/docker:
97
101
cd ${REPO_ROOT_PATH} ; rsync -av --exclude-from=' .gitignore' docker/ $$ dest
98
102
@echo -e " \033[1;33;40mWarning! Check the file list above that no unintended files were copied over to the distributable.\033[0m"
99
103
100
- # TODO package.json needed for gisnav image build to go through - try to
101
- # refactor it out (need better defined gisnav image)
102
104
$(BUILD_DIR ) /etc/gisnav/docs :
103
- @mkdir -p $@ /vitepress
104
- @echo " {}" > $@ /vitepress/package.json
105
+ @dest=debian/gisnav/$@ && \
106
+ mkdir -p $@ && \
107
+ touch $(BUILD_DIR ) /COLCON_IGNORE && \
108
+ cd ${REPO_ROOT_PATH} ; rsync -av --exclude-from=' .gitignore' docs/ $$ dest
Original file line number Diff line number Diff line change @@ -129,7 +129,9 @@ RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | b
129
129
130
130
COPY Makefile .pre-commit-config.yaml LICENSE.md README.md pyproject.toml /opt/colcon_ws/src/gisnav/
131
131
132
- # .git needed to make pre-commit work -> initialize a blank repo
133
- RUN git init
132
+ # .git needed to make pre-commit and git describe work
133
+ # TODO: solve this in a better way - we have an unnecessarily large git
134
+ # history in the container
135
+ COPY .git /opt/colcon_ws/src/gisnav/.git
134
136
135
137
ENTRYPOINT ["/entrypoint.sh" ]
You can’t perform that action at this time.
0 commit comments