wp-advads 1.0.31 → 1.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "wp-advads",
4
- "version": "1.0.31",
4
+ "version": "1.0.33",
5
5
  "description": "Create a Advanced Ads wordPress plugin eco system.",
6
6
  "author": {
7
7
  "name": "Shakeeb Ahmed",
@@ -13,7 +13,7 @@ import { pluginData } from './release.js';
13
13
  import wpPot from './wp-pot.js';
14
14
  import { heading, onSameLine, execCommand } from '../utilities/index.js'
15
15
 
16
- export default async (nextProcess = null) => {
16
+ export default function wpBuild(nextProcess = null) {
17
17
  heading('Building the plugin...')
18
18
  console.log('------------------------------------------------');
19
19
 
@@ -32,11 +32,11 @@ export default async (nextProcess = null) => {
32
32
 
33
33
  execCommand(
34
34
  'composer install -o -a -n --no-dev --no-scripts',
35
- function(stdout, error, stderr) {
35
+ function() {
36
36
  onSameLine(`${logSymbols.success} Installed PHP dependencies`);
37
37
  process.stderr.write('Composer dumping....')
38
38
 
39
- execCommand('composer dump', function(stdout, error, stderr) {
39
+ execCommand('composer dump', function() {
40
40
  onSameLine(`${logSymbols.success} Composer updated`)
41
41
  pluginData.commitMessages.push('update 3rd party dependecies')
42
42
  next();
@@ -15,12 +15,10 @@ import { execCommand, onSameLine, getSetting, write } from "../../utilities/inde
15
15
  export function getLatestTag() {
16
16
  return new Promise((resolve, reject) => {
17
17
  try {
18
- execCommand('git rev-list --tags --max-count=1', function(tags) {
19
- execCommand( 'git describe --tags ' + tags.trim(), function(version) {
20
- version = version.trim()
21
- resolve( '' !== version ? version : getSetting( 'wp.version', '0.0.0' ) )
22
- } )
23
- })
18
+ execCommand( 'git describe --tags --abbrev=0', function(version) {
19
+ version = version.trim().replace(/^v/, '')
20
+ resolve( '' !== version ? version : getSetting( 'wp.version', '0.0.0' ) )
21
+ } )
24
22
  }
25
23
  catch (err) {
26
24
  reject(err)
@@ -50,7 +50,7 @@ export function githubFinalTasks(next) {
50
50
  const message = pluginData.commitMessages.join('\n')
51
51
 
52
52
  execCommand('git add .', function() {
53
- execCommand(`git commit --no-verify -m 'bump version to ${version}' -m '${message}'`, function(result, err, stderr) {
53
+ execCommand(`git commit --no-verify -m 'bump version to ${version}' -m '${message}'`, function() {
54
54
  execCommand('git push', function() {
55
55
  onSameLine(`${logSymbols.success} Git commit successful`)
56
56
  next()