Skip to content

Commit

Permalink
Test release πŸ”Œβš‘πŸŒ
Browse files Browse the repository at this point in the history
  • Loading branch information
angelespejo committed Mar 12, 2023
1 parent 7a498fe commit f81e8dc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
File renamed without changes.
8 changes: 6 additions & 2 deletions .plugin-info.js β†’ .utils/plugin-info.js
Expand Up @@ -8,8 +8,9 @@
*/


const pkg = require( './composer.json' )
const pkg = require( '../composer.json' )
const fs = require('fs');
var path = require('path');

const pluginChange = `<?php
Expand Down Expand Up @@ -46,8 +47,11 @@ $loader->addPsr4('PigeonPosse\\\\FakeAdmin\\\\Utils\\\\', __DIR__.'/src/utils/')
require_once 'src/plugin.php';
`
const pluginFile = path.join(__dirname, '../'+pkg.custom.pluginFile )

fs.writeFile(pkg.custom.pluginFile, pluginChange, (err) => {
// console.log(pluginFile)

fs.writeFile(pluginFile, pluginChange, (err) => {
if (err) throw err;
console.log('File overwritten!');
});
6 changes: 3 additions & 3 deletions .zip.js β†’ .utils/zip.js
@@ -1,7 +1,7 @@

var fs = require('fs');
var path = require('path');
const pkg = require( './composer.json' )
const pkg = require( '../composer.json' )
var archiver = require('archiver');

/**
Expand All @@ -25,9 +25,9 @@ function zipDirectory(sourceDir, outPath) {
});
}

const distPath = './dist';
const distPath = '../dist';
const pluginPath = path.join(__dirname, 'plugin')
const zipPath = path.join(__dirname, `dist/${pkg.custom.textDomain}.zip`)
const zipPath = path.join(__dirname, `${distPath}/${pkg.custom.textDomain}.zip`)

if (fs.existsSync(distPath)) {
fs.rmSync(distPath, { recursive: true });
Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -11,16 +11,16 @@
"scripts": {
"start": "composer install && pnpm i",
"update": "pnpm up && composer update",
"plugin-file": "node .plugin-info.js",
"plugin-file": "node .utils/plugin-info.js",
"dev": "pnpm plugin-file && pnpm dev-composer && run-s dev:**",
"dev:docker": "docker-compose up -d --remove-orphans",
"dev:text": "node ./.docker-env.mjs --start-text",
"dev:text": "node .utils/docker-env.mjs --start-text",
"dev-composer": "composer run-script setup",
"dev-stop": "docker-compose down --volumes",
"dev-logs": "docker-compose logs",
"build": "pnpm plugin-file && run-s build:**",
"build:composer": "composer install --no-dev",
"build:zip": "node .zip.js",
"build:zip": "node .utils/zip.js",
"release": "release-it",
"watch": "pnpm build && run-s dev:**",
"pot": "composer run-script pot",
Expand Down

0 comments on commit f81e8dc

Please sign in to comment.