Skip to content

Commit

Permalink
Updated readme to include new pre- and post-release script functional…
Browse files Browse the repository at this point in the history
…ity and clarify sftp configuration and added a guidelines section and a license section; Configs are now also sorted to be uploaded last in the pipeline; Added guidelines and license
  • Loading branch information
HousebirdGames committed Apr 4, 2024
1 parent 629824c commit e90f38b
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 8 deletions.
25 changes: 25 additions & 0 deletions GUIDELINES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Logo and Name Usage Guidelines

Thank you for using the Birdhouse Framework. We are pleased that you've chosen our framework for your projects. To maintain the integrity of the Birdhouse Framework brand and to prevent any confusion or misrepresentation, we've established the following guidelines for using the Birdhouse Framework logo and name.

### Permitted Use

- **Project Attribution:** You may use the Birdhouse Framework logo and name to indicate that your project or product was built using the Birdhouse Framework. For example, in your project documentation or on your website, you may include statements like "Built with Birdhouse" together with the logo. You can also display the Birdhouse Framework logo with a note indicating your project's use of the framework.
- **Educational and Instructional Material:** You are welcome to use the logo and name in educational or instructional materials that teach or demonstrate how to use the Birdhouse Framework, such as tutorials, courses, or articles.

### Restrictions

- **No Implication of Affiliation or Endorsement:** The use of the Birdhouse Framework logo and name should not imply any official affiliation with or endorsement by the Birdhouse Framework team unless such a relationship has been formally established. Please avoid using the logo or name in a way that suggests sponsorship, partnership, or any official status without explicit permission.
- **Inappropriate Use:** You should not use the Birdhouse Framework logo or name in any way that is misleading, defamatory, infringes on intellectual property rights, violates any rights of privacy or publicity, or is otherwise unlawful or in any manner that disparages the Birdhouse Framework or its community.

### Visual and Verbal Representation

- **Maintain Original Design:** Do not alter, distort, or reconfigure the logo. It should be used as provided by the Birdhouse Framework, ensuring that its design integrity is preserved.

- **Color Modification:** You are permitted to modify the color of the logo to better align with your project's design aesthetic, provided there is sufficient contrast to maintain its visibility and recognizability. This flexibility is intended to facilitate the logo's integration into a variety of design contexts while respecting the Birdhouse Framework's brand identity.

- **Prohibited Uses:** The Birdhouse Framework logo should not be used in any manner that implies endorsement, affiliation, or sponsorship by the Birdhouse Framework unless such a relationship has been officially established. Additionally, the logo must not be used in contexts that could be considered inappropriate, offensive, or in conflict with the values and reputation of the Birdhouse Framework.

### Request for Permission

If you wish to use the Birdhouse Framework logo or name in any manner not covered by these guidelines, or if you have any doubts about the correct use of the logo and name, please contact us at [contact@housebird.games](mailto:contact@housebird.games). We're more than happy to discuss your needs and, if possible, grant permission.
7 changes: 7 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2024 Felix T. Vogel

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
59 changes: 53 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img src="https://birdhouse-js.com/img/icons/Icon-3000x3000.png" width="200">
</p>

# **Birdhouse**
# **The Birdhouse Framework**

## Introduction

Expand All @@ -16,6 +16,19 @@ Access comprehensive Birdhouse documentation at [birdhouse-js.com](https://birdh

For private, local access to the documentation, leverage the [official Birdhouse GitHub repository](https://github.com/HousebirdGames/Birdhouse-Website). Simply clone the repository and deploy it locally, for example, with XAMPP.

## Logo and Name Use Guidelines Notice

When using the Birdhouse Framework in your projects, please adhere to our [Logo and Name Use Guidelines](https://github.com/HousebirdGames/Birdhouse/blob/main/GUIDELINES.md) to ensure respectful and correct usage of our brand assets.

## License

The Birdhouse Framework is open source software licensed under the [MIT license](https://opensource.org/licenses/MIT). This license grants you the permission to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software, subject to the following conditions:

- **Acknowledgment:** While not required, we appreciate acknowledgment or attribution when the Birdhouse Framework is used in a project. This can be in the form of a link back to our [GitHub repository](https://github.com/HousebirdGames/Birdhouse) or our official website, [birdhouse-js.com](https://birdhouse-js.com).
- **Logo and Name Use:** The use of the Birdhouse Framework logo and name is governed by our Logo and Name Use Guidelines, which are designed to ensure the respectful and correct usage of our brand assets. Please refer to these guidelines for more details on how to use the Birdhouse Framework logo and name in your projects.

This license does not require you to make your own project open source if you use the Birdhouse Framework.

## Quick Start

Follow these steps to get the project up and running on your local machine:
Expand Down Expand Up @@ -100,10 +113,21 @@ Ensure to keep the `pipeline-config.js` updated with any changes in project stru
The `pipeline.js` script streamlines the release process. It will automatically compress any images from `uncompressedDir` to the `compressedDir`.
### Steps:
### Setting Up the Pipeline
To get started with deploying your Birdhouse project, you'll need to configure the deployment pipeline. This involves setting up configuration files for the pipeline itself and for secure file transfer (SFTP). Follow these steps to ensure everything is set up correctly:

1. **Configure the Pipeline:**

Edit the `pipeline-config.js` file located in your Birdhouse directory. This file contains settings specific to your project, such as deployment targets and versioning. Fill in the necessary details according to your project's requirements.
2. **Set Up SFTP:**
**First:** Configure the pipeline in `pipeline-config.js`.
**Second:** Configure the `sftp-config.js`.
Next, adjust the `sftp-config.js` file to match your server's SFTP connection details. This configuration enables the pipeline to upload your project files to the server.

3. **Configuration:**

For additional security and to make the SFTP configuration reusable for other Birdhouse projects, move the `sftp-config.js` file to the parent directory of your Birdhouse project. This separation ensures that sensitive information, like server credentials, is not stored within the project directory, reducing the risk of accidental exposure.

Make sure your are in the Birdhouse directory:
```bash
Expand All @@ -121,9 +145,32 @@ cd Birdhouse
pipeline.js -p -c -m -v 1.2.3.4
```
**Important:** Some files (like `service-worker-js`) are placed within `Birdhouse/root` and will be copied to the root of the project. This will be done automatically on deployment, but can also be triggered with the `-root`-flag.
**Important:** Some files (like `service-worker.js`) are placed within `Birdhouse/root` and will be copied to the root of the project. This will be done automatically on deployment, but can also be triggered with the `-root`-flag.
### Utilizing Pre- and Post-Release Scripts
For advanced deployment scenarios, your Birdhouse project might require the execution of additional Node.js scripts either before or after the deployment process. This feature is especially useful for tasks such as database migrations, environment setup, or cleanup operations that need to run in conjunction with your deployment workflow.
To integrate these tasks into your deployment process, you can specify them in the `pipeline-config.js` file within the Birdhouse directory. Add the relative paths to your scripts to the `preReleaseScripts` array for scripts that need to run before deployment, and to the `postReleaseScripts` array for scripts that should run after deployment. This configuration ensures that your scripts are executed automatically at the appropriate time during the deployment to either production or staging environments.
#### Example Configuration
```javascript
// In pipeline-config.js
module.exports = {
// Other configurations...
preReleaseScripts: [
'scripts/pre-deploy-script.js'
],
postReleaseScripts: [
'scripts/post-deploy-script.js'
]
};
```
This setup automatically calls `pre-deploy-script.js` (located in the scripts folder of your projects root directory) before initiating the deployment process and `post-deploy-script.js` after the deployment completes successfully. Make sure your scripts are idempotent (i.e., they can run multiple times without causing issues) and have proper error handling to avoid disrupting the deployment process.
### Command Line Options (most can be combined):
### Command Line Options:
- `-help`, `-h` or no flag: Display help message and exit. **(STRONGLY RECOMMENDED to get more detailed and up to date information)**
- `-update` or `-u`: Updates or creates the config.js and config-pipeline.js with necessary entries, orders them and exits.
Expand Down
12 changes: 10 additions & 2 deletions pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -876,8 +876,16 @@ async function uploadFilesToServer(filesToCache, applicationPath) {

//service worker is uploaded last to not trigger recaching on clients before all files are uploaded
filesToUpload.sort((a, b) => {
if (path.basename(a) === 'service-worker.js') return 1;
if (path.basename(b) === 'service-worker.js') return -1;
const filenameA = path.basename(a);
const filenameB = path.basename(b);

if (filenameA === 'service-worker.js') return 1;
if (filenameB === 'service-worker.js') return -1;
if (filenameA === 'config-sw.js') return 1;
if (filenameB === 'config-sw.js') return -1;
if (filenameA === 'config.js') return 1;
if (filenameB === 'config.js') return -1;

return 0;
});

Expand Down

0 comments on commit e90f38b

Please sign in to comment.