Skip to content

Commit c592bc2

Browse files
committed
security patch updated
1 parent 87b1882 commit c592bc2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+6736
-3739
lines changed

.github/workflows/release.yml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: Create GitHub Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*' # Triggers on version tags like v1.3.8
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: 📥 Checkout code
14+
uses: actions/checkout@v3
15+
16+
- name: ⚙️ Set up PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: '8.1'
20+
extensions: mbstring, intl, dom, curl
21+
tools: composer:v2
22+
23+
- name: 📦 Install dependencies (include vendor)
24+
run: composer install --no-dev -o
25+
26+
- name: 🏷️ Extract version
27+
id: extract_version
28+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
29+
30+
- name: 📝 Extract changelog for version
31+
id: changelog
32+
run: |
33+
VERSION="${{ steps.extract_version.outputs.VERSION }}"
34+
HEADER_REGEX="^### Version: ${VERSION}"
35+
36+
HEADER_LINE=$(grep -m1 "$HEADER_REGEX" "${GITHUB_WORKSPACE}/CHANGELOG.md" | sed 's/^### /## /')
37+
BODY=$(awk -v header="### Version: ${VERSION}" '
38+
$0 ~ header {
39+
capture = 1
40+
next
41+
}
42+
capture && /^### Version:/ {
43+
exit
44+
}
45+
capture { print }
46+
' "${GITHUB_WORKSPACE}/CHANGELOG.md")
47+
48+
if [ -z "$HEADER_LINE" ] || [ -z "$BODY" ]; then
49+
echo "❌ Changelog not found for version $VERSION"
50+
exit 1
51+
fi
52+
53+
echo "CHANGELOG_HEADER<<EOF" >> $GITHUB_ENV
54+
echo "$HEADER_LINE" >> $GITHUB_ENV
55+
echo "EOF" >> $GITHUB_ENV
56+
57+
echo "CHANGELOG_BODY<<EOF" >> $GITHUB_ENV
58+
echo "$BODY" >> $GITHUB_ENV
59+
echo "EOF" >> $GITHUB_ENV
60+
61+
- name: 📁 Prepare ZIP and TAR.GZ with proper structure
62+
run: |
63+
VERSION="${{ steps.extract_version.outputs.VERSION }}"
64+
PLUGIN_SLUG="ultimate-push-notifications"
65+
ZIP_NAME="${PLUGIN_SLUG}.${VERSION}.zip"
66+
TAR_NAME="${PLUGIN_SLUG}.${VERSION}.tar.gz"
67+
68+
# 🧹 Clean up temp workspace
69+
rm -rf release-tmp
70+
mkdir -p release-tmp/${PLUGIN_SLUG}
71+
72+
echo "🗂️ Copying clean files..."
73+
rsync -av ./ release-tmp/${PLUGIN_SLUG} \
74+
--exclude=".git" \
75+
--exclude=".github" \
76+
--exclude="node_modules" \
77+
--exclude="build" \
78+
--exclude="release-tmp" \
79+
--exclude="${ZIP_NAME}" \
80+
--exclude="${TAR_NAME}"
81+
82+
# ✅ Remove build folder if it was created again after rsync
83+
rm -rf release-tmp/${PLUGIN_SLUG}/build
84+
85+
# ✅ Ensure vendor is present
86+
cp -r vendor release-tmp/${PLUGIN_SLUG}/
87+
88+
# 🔍 Show copied folder before packaging
89+
echo "✅ Final contents to be zipped:"
90+
ls -la release-tmp/${PLUGIN_SLUG}
91+
92+
echo "📦 Creating zip and tar.gz"
93+
cd release-tmp
94+
zip -r "../${ZIP_NAME}" "${PLUGIN_SLUG}"
95+
tar -czf "../${TAR_NAME}" "${PLUGIN_SLUG}"
96+
cd ..
97+
98+
# 🧼 Final clean
99+
rm -rf release-tmp
100+
101+
echo "ZIP_NAME=${ZIP_NAME}" >> $GITHUB_ENV
102+
echo "TAR_NAME=${TAR_NAME}" >> $GITHUB_ENV
103+
104+
- name: 🚀 Create GitHub Release (with zip and tar.gz)
105+
uses: softprops/action-gh-release@v1
106+
with:
107+
name: Better Find and Replace
108+
tag_name: v${{ steps.extract_version.outputs.VERSION }}
109+
body: |
110+
${{ env.CHANGELOG_HEADER }}
111+
112+
${{ env.CHANGELOG_BODY }}
113+
files: |
114+
${{ env.ZIP_NAME }}
115+
${{ env.TAR_NAME }}
116+
env:
117+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ composer.phar
88
/node_modules/
99

1010
### Webpack Pre-Bundles ###
11-
/assets/js/src
12-
/assets/css/src
11+
/assets/js/*.min.js
12+
/assets/css/*.min.js
1313
/build/
14-
/src
15-
/idea.txt
16-
/workspace.code-workspace
14+
1715

1816
### build ###
1917

assets/css/upn-admin-style.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/upn-bp-style.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/upn-tabs.min.css

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*!*******************************************************************************************************************************************************!*\
2+
!*** css ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/scss/tabs.scss ***!
3+
\*******************************************************************************************************************************************************/
4+
.upn-tabs {
5+
display: flex;
6+
flex-wrap: wrap;
7+
flex-direction: row; }
8+
.upn-tabs .tabs {
9+
flex: 25%;
10+
margin-right: 15px; }
11+
@media (max-width: 767px) {
12+
.upn-tabs .tabs {
13+
margin-bottom: 20px;
14+
margin-right: 0px;
15+
flex: 100%;
16+
flex-direction: column; } }
17+
.upn-tabs .tabs ul {
18+
margin: 0px; }
19+
.upn-tabs .tabs ul li {
20+
background-color: #c3c4c7;
21+
transition: 0.3s all;
22+
flex: 100%; }
23+
.upn-tabs .tabs ul li:hover {
24+
background-color: #ffa611; }
25+
.upn-tabs .tabs ul li.active {
26+
background-color: #ffa611; }
27+
.upn-tabs .tabs ul li.active a {
28+
color: black; }
29+
.upn-tabs .tabs ul li a {
30+
padding: 10px;
31+
cursor: pointer;
32+
color: white;
33+
flex: 100%;
34+
display: block;
35+
font-weight: bold; }
36+
.upn-tabs .tabs ul li a:hover {
37+
color: black; }
38+
.upn-tabs .tabs-content {
39+
flex: 70%;
40+
border: 2px solid #ffa611;
41+
padding: 15px; }
42+
@media (max-width: 767px) {
43+
.upn-tabs .tabs-content {
44+
margin-bottom: 20px;
45+
margin-right: 0px;
46+
flex: 100%;
47+
flex-direction: column; } }
48+

0 commit comments

Comments
 (0)