fix: check core before release

This commit is contained in:
Hiddify
2024-01-26 19:07:38 +01:00
parent c8f4b34de6
commit 0e64e26688

View File

@@ -134,9 +134,11 @@ build-ios-libs:
mv $(BINDIR)/$(CORE_NAME)-ios.xcframework $(IOS_OUT)/Libcore.xcframework mv $(BINDIR)/$(CORE_NAME)-ios.xcframework $(IOS_OUT)/Libcore.xcframework
release: # Create a new tag for release. release: # Create a new tag for release.
@echo "previous version was $$(git describe --tags $$(git rev-list --tags --max-count=1))" @echo "previous version was $$(git describe --tags $$(git rev-list --tags --max-count=1))"
@echo "WARNING: This operation will creates version tag and push to github" @echo "WARNING: This operation will creates version tag and push to github"
@bash -c '\ @bash -c '\
[ "404" == $$(curl -I -s -w "%{http_code}" https://github.com/hiddify/hiddify-next-core/releases/download/v$(core.version)/hiddify-libcore-windows-amd64.h.gz -o /dev/null) ]&&{ echo "Core Not Found"; exit 1 ; };\
cversion_string=`grep -e "^version:" pubspec.yaml | cut -d: -f2-`; \ cversion_string=`grep -e "^version:" pubspec.yaml | cut -d: -f2-`; \
cstr_version=`echo "$${cversion_string}" | sed -n "s/[ ]*\\([0-9]\\+\\.[0-9]\\+\\.[0-9]\\+\\)+.*/\\1/p"`; \ cstr_version=`echo "$${cversion_string}" | sed -n "s/[ ]*\\([0-9]\\+\\.[0-9]\\+\\.[0-9]\\+\\)+.*/\\1/p"`; \
cbuild_number=`echo "$${cversion_string}" | sed -n "s/.*+\\([0-9]\\+\\)/\\1/p"`; \ cbuild_number=`echo "$${cversion_string}" | sed -n "s/.*+\\([0-9]\\+\\)/\\1/p"`; \