Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

composer_config_dev #65

Merged
merged 6 commits into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 35 additions & 0 deletions .github/scripts/deploay-bundle
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

## Deploy khodakhah/nodcms-bundle

# Setup variables
SOURCE=$1
TARGET=$2
RELEASE=$3

echo "Preparing for version $3"
echo "Merging files from $1 to $2"

# Prepare the source
cd $SOURCE
git checkout master

# Prepare the target
cd $TARGET
git checkout master
rm -rf *

# Copy common files
releasable='nodcms-core nodcms-about nodcms-articles nodcms-blog nodcms-gallery nodcms-installer nodcms-layout nodcms-portfolio nodcms-pricingtable nodcms-services nodcms-user public writable LICENSE'
for fff in $releasable;
do
cp -Rf ${SOURCE}/$fff ./
done

# Copy repo-specific files
cp -Rf ${SOURCE}/admin/bundle/. ./

# Commit the changes
git add .
git commit -m "Release ${RELEASE}"
git push
53 changes: 53 additions & 0 deletions .github/workflows/deploy-bundle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# When a new Release is created, deploy relevant
# files to each of the generated repos.
name: Deploy Bundle

on:
release:
types: [published]

jobs:
bundle:
name: Deploy to bundle
if: github.repository == 'khodakhah/nodcms'
runs-on: ubuntu-latest
steps:
- name: Identify
run: |
git config --global user.email "[email protected]"
git config --global user.name "${GITHUB_ACTOR}"

- name: Checkout source
uses: actions/checkout@v2
with:
path: source

- name: Checkout target
uses: actions/checkout@v2
with:
repository: khodakhah/nodcms-bundle
token: ${{ secrets.ACCESS_TOKEN }}
path: nodcms-bundle

- name: Chmod
run: chmod +x ./source/.github/scripts/deploy-bundle

- name: Deploy
run: ./source/.github/scripts/deploy-bundle ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/bundle ${GITHUB_REF##*/}

- name: Release
uses: actions/github-script@v5
with:
github-token: ${{secrets.ACCESS_TOKEN}}
script: |
const release = await github.repos.getLatestRelease({
owner: context.repo.owner,
repo: context.repo.repo
})
github.repos.createRelease({
owner: context.repo.owner,
repo: 'nodcms-bundle',
tag_name: release.data.tag_name,
name: release.data.name,
body: release.data.body
})
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# [NodCMS](http://nodcms.com)
> **WARNING**: The project on `master` branch will not work for a while. I'm changing the project structure and implementing an automated workflow.
>
> Therefore I recommended the NodCMS [v3.1](https://github.com/khodakhah/nodcms/tree/v.3.1) instead.
>
NodCMS is a <strong>free</strong>, Multilingual, simple and powerful CMS powered by [CodeIgniter4]((https://codeigniter.com/)).

More information can be found at [nodcms.com](http://nodcms.com/).

> Demo: [demo.nodcms.com](http://demo.nodcms.com/)
>
> Username: **demo**
>
> Password: **demo**
## Demo
[demo.nodcms.com](http://demo.nodcms.com/)

Username: `demo`, Password: `demo`

## NodCMS v3.x
> IMPORTANT: **CodeIgniter4 Application Structure**!
Expand Down
50 changes: 50 additions & 0 deletions admin/bundle/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# NodCMS Bundle
NodCMS is an open-source, Multilingual, simple and powerful CMS based on [CodeIgniter4]((https://codeigniter.com/)).

## Repository INFO
This repository holds the bundle CMS for who want to download the CMS and upload it on host or server.

It has been built from the [development repository](https://github.com/khodakhah/nodcms).

More information can be found at [nodcms.com](http://nodcms.com/).

Merge requests would not be accepted on this repository. So please do merge requests only on [development repository](https://github.com/khodakhah/nodcms).

## Demo
[demo.nodcms.com](http://demo.nodcms.com/)

Username: **demo**

Password: **demo**

## NodCMS v3.x
IMPORTANT: **CodeIgniter4 Application Structure**!

Since NodCMS v3.0 (based on Codeigniter4) your domain should point to the public folder.

`public/` is your website root directory. [Learn More](https://codeigniter.com/user_guide/concepts/structure.html#public)

The following points are the most important changes on NodCMS since v3.x
1. Codeigniter 4
2. New NodCMS core & structure
3. Better modular structure
4. Some quick debugs

## Download ##
You can download the master branch as a ZIP file: [GitHub Download](https://github.com/khodakhah/nodcms-bundle/archive/master.zip)!

## Installation ##
> At this time there is no composer installation, but it has been planned!

So you can only need to follow the below steps right now.

1. Download the project at first.
2. Extract the zip file on your host.
3. Create a new database on your host for NodCMS.
4. Open the project on the browser.
5. You will see installer wizard to build your database.

[Learn more](https://nodcms.com/user-guide/)

## Bugs Reports
If you find an issue, let me know [here](https://github.com/khodakhah/nodcms/issues/new)!
70 changes: 70 additions & 0 deletions admin/bundle/public/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?php

// Valid PHP Version?
$minPHPVersion = '7.3';
if (phpversion() < $minPHPVersion)
{
die("Your PHP version must be {$minPHPVersion} or higher to run CodeIgniter. Current version: " . phpversion());
}
unset($minPHPVersion);

// Acceptable values: development, testing, production
define('ENVIRONMENT', 'production');

// Path to the front controller (this file)
define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR);

// Root directory
define("ROOTPATH", dirname(FCPATH).DIRECTORY_SEPARATOR);
// CodeIgniter core path
define("SYSTEMPATH", ROOTPATH."system".DIRECTORY_SEPARATOR);
// NodCMS core path
define("COREPATH", ROOTPATH."nodcms-core".DIRECTORY_SEPARATOR);
// NodCMS public path
define("SELF_PATH", FCPATH);

// Find the requested protocol
$protocol_status = intval(isset($_SERVER['HTTPS']));
define("SSL_PROTOCOL", $protocol_status);
define("URL_PROTOCOL", $protocol_status ? "https://" : "http://");

// Find the base url
define("CONFIG_BASE_URL", URL_PROTOCOL.$_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/");

define("DB_CONFIG_PATH", COREPATH.'Config/Database.php');

// Location of the NodCMS addon bootstrap file.
require COREPATH.'bootstrap.php';

// Location of the Paths config file.
// This is the line that might need to be changed, depending on your folder structure.
$pathsPath = realpath(COREPATH . 'Config/Paths.php');
// ^^^ Change this if you move your application folder

/*
*---------------------------------------------------------------
* BOOTSTRAP THE APPLICATION
*---------------------------------------------------------------
* This process sets up the path constants, loads and registers
* our autoloader, along with Composer's, loads our constants
* and fires up an environment-specific bootstrapping.
*/

// Ensure the current directory is pointing to the front controller's directory
chdir(__DIR__);

// Load our paths config file
require $pathsPath;
$paths = new Config\Paths();

// Location of the framework bootstrap file.
$app = require rtrim($paths->systemDirectory, '/ ') . '/bootstrap.php';

/*
*---------------------------------------------------------------
* LAUNCH THE APPLICATION
*---------------------------------------------------------------
* Now that everything is setup, it's time to actually fire
* up the engines and make this app do its thang.
*/
$app->run();
6 changes: 0 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
"CodeIgniter\\": "system/"
}
},
"scripts": {
"post-update-cmd": [
"NodCMS\\Core\\ComposerScripts::postUpdate",
"CodeIgniter\\ComposerScripts::postUpdate"
]
},
"support": {
"forum": "https://nodecms.com/",
"source": "https://github.com/khodakhah/nodcms"
Expand Down
Loading