mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
plugins: while here also do PLUGIN_STABLE
This commit is contained in:
+16
-14
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2016-2022 Franco Fichtner <franco@opnsense.org>
|
||||
# Copyright (c) 2016-2024 Franco Fichtner <franco@opnsense.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
@@ -48,6 +48,8 @@ PLUGIN_ABI?= ${_PLUGIN_ABI}
|
||||
PLUGIN_ABI?= 24.7
|
||||
.endif
|
||||
|
||||
PLUGIN_STABLE?= stable/${PLUGIN_ABI}
|
||||
|
||||
PHPBIN= ${LOCALBASE}/bin/php
|
||||
|
||||
.if exists(${PHPBIN})
|
||||
@@ -103,34 +105,34 @@ ${_TARGET}_ARG= ${${_TARGET}_ARGS:[0]}
|
||||
.endfor
|
||||
|
||||
ensure-stable:
|
||||
@if ! git show-ref --verify --quiet refs/heads/stable/${PLUGIN_ABI}; then \
|
||||
git update-ref refs/heads/stable/${PLUGIN_ABI} refs/remotes/origin/stable/${PLUGIN_ABI}; \
|
||||
git config branch.stable/${PLUGIN_ABI}.merge refs/heads/stable/${PLUGIN_ABI}; \
|
||||
git config branch.stable/${PLUGIN_ABI}.remote origin; \
|
||||
@if ! git show-ref --verify --quiet refs/heads/${PLUGIN_STABLE}; then \
|
||||
git update-ref refs/heads/${PLUGIN_STABLE} refs/remotes/origin/${PLUGIN_STABLE}; \
|
||||
git config branch.${PLUGIN_STABLE}.merge refs/heads/${PLUGIN_STABLE}; \
|
||||
git config branch.${PLUGIN_STABLE}.remote origin; \
|
||||
fi
|
||||
|
||||
diff_ARGS?= .
|
||||
|
||||
diff: ensure-stable
|
||||
@git diff --stat -p stable/${PLUGIN_ABI} ${.CURDIR}/${diff_ARGS:[1]}
|
||||
@git diff --stat -p ${PLUGIN_STABLE} ${.CURDIR}/${diff_ARGS:[1]}
|
||||
|
||||
feed: ensure-stable
|
||||
@git log --stat -p --reverse stable/${PLUGIN_ABI}...${feed_ARGS:[1]}~1
|
||||
@git log --stat -p --reverse ${PLUGIN_STABLE}...${feed_ARGS:[1]}~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 diff --stat -p ${PLUGIN_STABLE} ${.CURDIR}/${MFC} > /tmp/mfc.diff
|
||||
@git checkout ${PLUGIN_STABLE}
|
||||
@git apply /tmp/mfc.diff
|
||||
@git add ${.CURDIR}/${MFC}
|
||||
@if ! git diff --quiet HEAD; then \
|
||||
git commit -m "${MFC:S/^.$/${PLUGIN_DIR}/}: sync with master"; \
|
||||
fi
|
||||
.else
|
||||
@git checkout stable/${PLUGIN_ABI}
|
||||
@git checkout ${PLUGIN_STABLE}
|
||||
@if ! git cherry-pick -x ${MFC}; then \
|
||||
git cherry-pick --abort; \
|
||||
fi
|
||||
@@ -139,20 +141,20 @@ mfc: ensure-stable
|
||||
.endfor
|
||||
|
||||
stable:
|
||||
@git checkout stable/${PLUGIN_ABI}
|
||||
@git checkout ${PLUGIN_STABLE}
|
||||
|
||||
master:
|
||||
@git checkout master
|
||||
|
||||
rebase:
|
||||
@git checkout stable/${PLUGIN_ABI}
|
||||
@git checkout ${PLUGIN_STABLE}
|
||||
@git rebase -i
|
||||
@git checkout master
|
||||
|
||||
log:
|
||||
@git log --stat -p stable/${PLUGIN_ABI}
|
||||
@git log --stat -p ${PLUGIN_STABLE}
|
||||
|
||||
push:
|
||||
@git checkout stable/${PLUGIN_ABI}
|
||||
@git checkout ${PLUGIN_STABLE}
|
||||
@git push
|
||||
@git checkout master
|
||||
|
||||
Reference in New Issue
Block a user