Merge remote-tracking branch 'origin/nim_v1'
This commit is contained in:
commit
5cb392ec56
|
@ -98,7 +98,7 @@ $(NIMBLE_DIR): | $(NIM_BINARY)
|
|||
git submodule foreach --quiet '$(CURDIR)/$(BUILD_SYSTEM_DIR)/scripts/create_nimble_link.sh "$$sm_path"'
|
||||
|
||||
clean-common:
|
||||
rm -rf build/{*.exe,*.so,*.so.0} vendor/go/bin $(NIMBLE_DIR) $(NIM_BINARY) $(NIM_DIR)/nimcache nimcache
|
||||
rm -rf build/{*.exe,*.so,*.so.0} vendor/go/bin $(NIMBLE_DIR) $(NIM_BINARY) $(NIM_DIR)/bin/timestamp $(NIM_DIR)/nimcache nimcache
|
||||
+ [[ -e vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc ]] && $(MAKE) -C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc clean $(HANDLE_OUTPUT) || true
|
||||
+ [[ -e vendor/nim-nat-traversal/vendor/libnatpmp ]] && $(MAKE) -C vendor/nim-nat-traversal/vendor/libnatpmp clean $(HANDLE_OUTPUT) || true
|
||||
|
||||
|
|
|
@ -40,12 +40,6 @@ else
|
|||
ON_WINDOWS=0
|
||||
EXE_SUFFIX=""
|
||||
fi
|
||||
# macOS
|
||||
if uname | grep -qi "darwin"; then
|
||||
STAT_FORMAT="-f %m"
|
||||
else
|
||||
STAT_FORMAT="-c %Y"
|
||||
fi
|
||||
|
||||
NIM_BINARY="${NIM_DIR}/bin/nim${EXE_SUFFIX}"
|
||||
|
||||
|
@ -61,8 +55,8 @@ nim_needs_rebuilding() {
|
|||
cp -a "$CI_CACHE"/* "$NIM_DIR"/bin/ || true # let this one fail with an empty cache dir
|
||||
fi
|
||||
|
||||
# compare binary mtime to the date of the last commit (keep in mind that Git doesn't preserve file timestamps)
|
||||
if [[ -e "$NIM_BINARY" && $(stat $STAT_FORMAT "$NIM_BINARY") -gt $(cd "$NIM_DIR"; git log --pretty=format:%cd -n 1 --date=unix) ]]; then
|
||||
# compare the built commit's timestamp to the date of the last commit (keep in mind that Git doesn't preserve file timestamps)
|
||||
if [[ -e "${NIM_DIR}/bin/timestamp" && $(cat "${NIM_DIR}/bin/timestamp") -ne $(cd "$NIM_DIR"; git log --pretty=format:%cd -n 1 --date=unix) ]]; then
|
||||
return $NO_REBUILD
|
||||
else
|
||||
return $REBUILD
|
||||
|
@ -126,6 +120,9 @@ build_nim() {
|
|||
sh build_all_custom.sh
|
||||
rm build_all_custom.sh
|
||||
|
||||
# record the last commit's timestamp
|
||||
git log --pretty=format:%cd -n 1 --date=unix > bin/timestamp
|
||||
|
||||
# update the CI cache
|
||||
popd # we were in $NIM_DIR
|
||||
if [[ -n "$CI_CACHE" ]]; then
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit c6f601d48ec81e0d6e052ba0d19a195b55cc68f2
|
||||
Subproject commit 193b3c66bbeffafaebff166d24b9866f1eaaac0e
|
|
@ -1 +1 @@
|
|||
Subproject commit b56e49bbedf62db22eb26388f98262e2948b2cbc
|
||||
Subproject commit f72f471adb743bea4f8d8c59d19aa1cb885dcc59
|
Loading…
Reference in New Issue