mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
Framework: allow MFC from subdir
This commit is contained in:
+7
-3
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2016-2021 Franco Fichtner <franco@opnsense.org>
|
||||
# Copyright (c) 2016-2022 Franco Fichtner <franco@opnsense.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
@@ -121,18 +121,22 @@ ensure-stable:
|
||||
git config branch.stable/${PLUGIN_ABI}.remote origin; \
|
||||
fi
|
||||
|
||||
diff_ARGS?= .
|
||||
|
||||
diff: ensure-stable
|
||||
@git diff --stat -p stable/${PLUGIN_ABI} ${.CURDIR}/${diff_ARGS:[1]}
|
||||
|
||||
mfc_ARGS?= .
|
||||
|
||||
mfc: ensure-stable
|
||||
.for MFC in ${mfc_ARGS}
|
||||
.if exists(${MFC})
|
||||
@git diff --stat -p stable/${PLUGIN_ABI} ${.CURDIR}/${MFC} > /tmp/mfc.diff
|
||||
@git checkout stable/${PLUGIN_ABI}
|
||||
@git apply /tmp/mfc.diff
|
||||
@git add ${.CURDIR}
|
||||
@git add ${.CURDIR}/${MFC}
|
||||
@if ! git diff --quiet HEAD; then \
|
||||
git commit -m "${MFC}: sync with master"; \
|
||||
git commit -m "${MFC:S/^.$/${PLUGIN_DIR}/}: sync with master"; \
|
||||
fi
|
||||
.else
|
||||
@git checkout stable/${PLUGIN_ABI}
|
||||
|
||||
@@ -80,6 +80,10 @@ PLUGIN_CONFLICTS+= ${${_PLUGIN_VARIANT}_NAME}
|
||||
PLUGIN_DEPENDS+= ${${PLUGIN_VARIANT}_DEPENDS}
|
||||
.endif
|
||||
|
||||
.if !empty(PLUGIN_NAME)
|
||||
PLUGIN_DIR?= ${.CURDIR:S/\// /g:[-2]}/${.CURDIR:S/\// /g:[-1]}
|
||||
.endif
|
||||
|
||||
PLUGIN_PKGNAMES= ${PLUGIN_PREFIX}${PLUGIN_NAME}${PLUGIN_SUFFIX} \
|
||||
${PLUGIN_PREFIX}${PLUGIN_NAME}
|
||||
.for CONFLICT in ${PLUGIN_CONFLICTS}
|
||||
|
||||
Reference in New Issue
Block a user