forked from wpscholar/github-archive-installer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix compat with composer 2.x drop composer 1.x support.
- Loading branch information
Showing
7 changed files
with
2,677 additions
and
13 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Chores | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
#==========================# | ||
# 1. Dispatch To Meta Repo # | ||
#==========================# | ||
dispatch: | ||
if: startsWith(github.event_name, 'push') && endsWith(github.ref, 'master') | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Repository Dispatch | ||
uses: peter-evans/repository-dispatch@v1 | ||
with: | ||
token: ${{ secrets.ETSTAGING_TOKEN }} | ||
repository: elegantthemes/meta | ||
event-type: master-branch-updated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
.idea | ||
*.iml | ||
node_modules | ||
vendor | ||
.directory | ||
*.bak | ||
*.gho | ||
*.ori | ||
*.orig | ||
*.tmp | ||
.*.kate-swp | ||
.swp.* | ||
|
||
# all files that end in ~ since those are typically temp files | ||
*~ | ||
|
||
# temporary files which can be created if a process still has a handle open of a deleted file | ||
.fuse_hidden* | ||
|
||
# KDE directory preferences | ||
.directory | ||
|
||
# Linux trash folder which might appear on any partition or disk | ||
.Trash-* | ||
|
||
# .nfs files are created when an open file is removed but is still being accessed | ||
.nfs* | ||
|
||
.vscode/* | ||
*.code-workspace | ||
|
||
# Local History for Visual Studio Code | ||
.history/ | ||
|
||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# GitHub Archive Installer | ||
|
||
A custom Composer installer that will install a dependency from a GitHub release archive .zip file when installing from distribution. | ||
|
||
## Why You Need It | ||
It is very common that you might have a number of development only files in your code library source files. Unless explicitly installing from source, you generally don't need to have development only files in your final distribution. You may also want to perform some specific build steps such as building some production-ready JavaScript files. This installer allows you to keep generated code out of your repository while still being able to reliably deliver it in your final distribution. | ||
|
||
Using a tool like Travis CI, you can automate the build of your final distribution and automatically attach the generated .zip file to the release on GitHub. Then, using this installer, you can easily configure your library to install the generated .zip file when installing as `dist` in Composer. | ||
|
||
## How it Works | ||
|
||
Any package with a direct dependency on `wpscholar/github-archive-installer` and a valid stable version number being installed from distribution will be installed from the GitHub archive `<repo-name>.zip` file associated with a specific release. | ||
|
||
For example, if my Composer package is named `wpscholar/hello-world` then my generated .zip file should be named `hello-world.zip` in order to be properly installed using this installer. | ||
|
||
This installer only changes the `distUrl` for the package in Composer. It doesn't override any existing installers that work based off of the `type` property in your `composer.json` file. For example, if you have a package of type `wordpress-plugin` your package would still install in the correct location in WordPress. However, when installing from `dist` it would simply pull from the .zip file attached to your GitHub release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
{ | ||
"name": "wpscholar/github-archive-installer", | ||
"name": "elegantthemes/github-archive-installer", | ||
"description": "A custom Composer installer that will install a dependency from a GitHub release archive .zip file when installing from distribution.", | ||
"type": "composer-plugin", | ||
"version": "1.0", | ||
"license": "GPL-2.0-or-later", | ||
"authors": [ | ||
{ | ||
"name": "Dustin Falgout", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Micah Wood", | ||
"email": "[email protected]" | ||
|
@@ -12,12 +17,16 @@ | |
"require": { | ||
"composer-plugin-api": "^1.1 || ^2.0" | ||
}, | ||
"require-dev": { | ||
"composer/composer": "^2.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"wpscholar\\Composer\\": "src" | ||
"ET\\Composer\\": "src" | ||
} | ||
}, | ||
"extra": { | ||
"class": "wpscholar\\Composer\\GithubArchiveInstaller" | ||
"class": "ET\\Composer\\GithubArchiveInstaller", | ||
"plugin-modifies-downloads": true | ||
} | ||
} |
Oops, something went wrong.