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"'
|
git submodule foreach --quiet '$(CURDIR)/$(BUILD_SYSTEM_DIR)/scripts/create_nimble_link.sh "$$sm_path"'
|
||||||
|
|
||||||
clean-common:
|
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/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
|
+ [[ -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
|
ON_WINDOWS=0
|
||||||
EXE_SUFFIX=""
|
EXE_SUFFIX=""
|
||||||
fi
|
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}"
|
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
|
cp -a "$CI_CACHE"/* "$NIM_DIR"/bin/ || true # let this one fail with an empty cache dir
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# compare binary mtime to the date of the last commit (keep in mind that Git doesn't preserve file timestamps)
|
# 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_BINARY" && $(stat $STAT_FORMAT "$NIM_BINARY") -gt $(cd "$NIM_DIR"; git log --pretty=format:%cd -n 1 --date=unix) ]]; then
|
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
|
return $NO_REBUILD
|
||||||
else
|
else
|
||||||
return $REBUILD
|
return $REBUILD
|
||||||
|
@ -126,6 +120,9 @@ build_nim() {
|
||||||
sh build_all_custom.sh
|
sh build_all_custom.sh
|
||||||
rm 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
|
# update the CI cache
|
||||||
popd # we were in $NIM_DIR
|
popd # we were in $NIM_DIR
|
||||||
if [[ -n "$CI_CACHE" ]]; then
|
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