Skip to content

Commit bcb7cda

Browse files
committed
version 1.0.1 released
1 parent 12f387f commit bcb7cda

File tree

7 files changed

+174
-6
lines changed

7 files changed

+174
-6
lines changed

.distignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/.wordpress-org
2+
/.git
3+
/.github
4+
/node_modules
5+
6+
.distignore
7+
.gitignore
8+
.gitattributes

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Directories
2+
/.wordpress-org export-ignore
3+
/.github export-ignore
4+
5+
# Files
6+
/.gitattributes export-ignore
7+
/.gitignore export-ignore

.github/workflows/deploy.yml

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*.*.*'
7+
branches:
8+
- master
9+
10+
jobs:
11+
create_release:
12+
if: github.ref == 'refs/heads/master'
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Find Readme File
20+
id: find_readme
21+
run: |
22+
for file in README.txt README.md Readme.txt Readme.md readme.txt readme.md; do
23+
if [ -f "$file" ]; then
24+
echo "Readme file found: $file"
25+
echo "readme_file=$file" >> $GITHUB_ENV
26+
break
27+
fi
28+
done
29+
30+
# Ensure the variable is available within the current step
31+
source $GITHUB_ENV
32+
33+
if [ -z "$readme_file" ]; then
34+
echo "::error::Readme file not found."
35+
exit 1
36+
fi
37+
38+
- name: Extract Release Notes
39+
id: release_notes
40+
run: |
41+
changelog_section_start="== Changelog =="
42+
readme_file="$readme_file"
43+
#plugin_version="${{ github.ref_name }}" # Assuming the tag is the version
44+
plugin_version="${GITHUB_REF#refs/tags/}"
45+
46+
echo "DEBUG: Plugin latest version found $plugin_version."
47+
48+
in_changelog=0
49+
found_version=0
50+
release_notes=""
51+
52+
echo "DEBUG: Starting to extract release notes from $readme_file for version $plugin_version."
53+
54+
while IFS= read -r line; do
55+
echo "DEBUG: Processing line: $line"
56+
57+
# Start processing after the changelog header
58+
if [[ "$line" == "$changelog_section_start" ]]; then
59+
in_changelog=1
60+
echo "DEBUG: Found changelog section header."
61+
continue
62+
fi
63+
64+
# Skip if not in changelog section
65+
if [[ $in_changelog -eq 0 ]]; then
66+
echo "DEBUG: Skipping line (not in changelog section)."
67+
continue
68+
fi
69+
70+
# Check for the current version header
71+
if [[ "$line" == "= ${plugin_version} =" ]]; then
72+
found_version=1
73+
echo "DEBUG: Found version header for $plugin_version."
74+
continue
75+
fi
76+
77+
# Break if a new version header is found after the current version
78+
if [[ $found_version -eq 1 ]] && echo "$line" | grep -qE '^= [0-9]+\.[0-9]+\.[0-9]+ =$'; then
79+
echo "DEBUG: Found a new version header. Stopping collection."
80+
break
81+
fi
82+
83+
# Collect lines starting with '*' if we are in the current version section
84+
if [[ $found_version -eq 1 ]] && echo "$line" | grep -qE '^\*'; then
85+
echo "DEBUG: Found changelog entry: $line"
86+
release_notes+="${line}\n"
87+
continue
88+
fi
89+
90+
# Log skipped lines in the current version section
91+
if [[ $found_version -eq 1 ]]; then
92+
echo "DEBUG: Skipping line (not a changelog entry): $line"
93+
fi
94+
done < "$readme_file"
95+
96+
if [[ -z "$release_notes" ]]; then
97+
echo "::error::Failed to extract release notes for version ${plugin_version}."
98+
exit 1
99+
fi
100+
101+
echo "DEBUG: Successfully extracted release notes."
102+
echo "DEBUG: Release notes content:"
103+
echo -e "$release_notes"
104+
105+
# Write the release notes with actual line breaks
106+
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
107+
echo -e "$release_notes" >> $GITHUB_ENV
108+
echo "EOF" >> $GITHUB_ENV
109+
110+
111+
- name: Create zip file
112+
run: |
113+
REPO_NAME=$(basename `git rev-parse --show-toplevel`)
114+
zip -r ${REPO_NAME}.zip . -x '*.git*' -x '.github/*' -x '*.distignore*' -x 'CHANGELOG.txt'
115+
echo "repo_name=${REPO_NAME}" >> $GITHUB_ENV
116+
117+
# Source to make repo_name available in subsequent steps
118+
source $GITHUB_ENV
119+
120+
- name: Create Release
121+
id: create_release
122+
uses: actions/create-release@v1
123+
env:
124+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
125+
with:
126+
tag_name: ${{ github.ref_name }}
127+
release_name: "${{ github.ref_name }}"
128+
body: ${{ env.RELEASE_NOTES }}
129+
draft: false
130+
prerelease: false
131+
132+
- name: Upload Release Asset
133+
uses: actions/upload-release-asset@v1
134+
env:
135+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
136+
with:
137+
upload_url: ${{ steps.create_release.outputs.upload_url }}
138+
asset_path: ./${{ env.repo_name }}.zip
139+
asset_name: ${{ env.repo_name }}.zip
140+
asset_content_type: application/zip

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
script.sh

includes/Factories/Job/DummyJobGenerate.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ public function run( $args, $assoc_args ) {
5656
// Get the results
5757
$users = $user_query->get_results();
5858

59-
//write_log($users);
60-
6159
// Check if any users are found and output the first user's ID
6260
if ( ! empty( $users ) ) {
6361
$user_id = $users[0]->ID;

includes/Factories/Misc/EasyPluginChecker.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ public function run( $args, $assoc_args ) {
3535

3636
// Set default output file if not provided
3737
if (empty($output_file)) {
38-
$output_file = ABSPATH . 'plugin-check.log';
38+
/*if($format == 'json'){
39+
$output_file = ABSPATH . 'plugin-check.json';
40+
}*/
41+
//else{
42+
$output_file = ABSPATH . 'plugin-check.log';
43+
//}
3944
}
4045

4146
// Build the command to check the plugin

readme.txt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
CBX Career Dev Toolkit
1+
=== CBX Career Toolkit ===
2+
Contributors: codeboxr, manchumahara
3+
Requires at least: 5.3
4+
Tested up to: 6.7.1
5+
Stable tag: 1.0.1
6+
License: MIT
7+
License URI: https://github.com/codeboxrcodehub/cbxphpspreadsheet/blob/master/LICENSE.txt
8+
9+
Comfort HRM plugin management toolkits
210

311
== Description ==
412

5-
This plugin provides command line interface for creating dummy job and resume.
13+
This plugin provides command line interface for creating dummy job, resume and other misc commands needed for better management for HRM plugins.
614

715
== Installation ==
816

@@ -13,7 +21,8 @@ This plugin provides command line interface for creating dummy job and resume.
1321

1422

1523
== Changelog ==
16-
24+
= 1.0.1 =
25+
* Add new command 'easy-plugin-checker' that extends the plugin Plugin Check and outputs in a file
1726

1827
= 1.0.0 =
1928
* First public release

0 commit comments

Comments
 (0)