Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Drupal Spoons deprecated
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Composer
plugin
Drupal Spoons deprecated
Commits
fe52052a
Commit
fe52052a
authored
4 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Further improvements around scripting
Create .gitlab-ci.yml if not yet present
parent
fd709606
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
bin/prepareLocally.sh
+0
-0
0 additions, 0 deletions
bin/prepareLocally.sh
bin/spoon
+6
-0
6 additions, 0 deletions
bin/spoon
composer.json
+3
-0
3 additions, 0 deletions
composer.json
src/Handler.php
+23
-0
23 additions, 0 deletions
src/Handler.php
with
32 additions
and
0 deletions
prepareLocally.sh
→
bin/
prepareLocally.sh
+
0
−
0
View file @
fe52052a
File moved
This diff is collapsed.
Click to expand it.
bin/spoon
0 → 100755
+
6
−
0
View file @
fe52052a
#!/bin/bash
COMPOSER
=
composer.spoons.json
export
COMPOSER
composer
$@
This diff is collapsed.
Click to expand it.
composer.json
+
3
−
0
View file @
fe52052a
...
...
@@ -28,6 +28,9 @@
"LakeDrops\\DrupalSpoons\\"
:
"src/"
}
},
"bin"
:
[
"bin/spoon"
],
"extra"
:
{
"class"
:
"LakeDrops
\\
DrupalSpoons
\\
Plugin"
},
...
...
This diff is collapsed.
Click to expand it.
src/Handler.php
+
23
−
0
View file @
fe52052a
...
...
@@ -14,6 +14,8 @@ use Symfony\Component\Filesystem\Filesystem;
*/
class
Handler
{
const
DRUPAL_SPOONS_VERSION
=
'1.7.0-rc1'
;
/**
* The composer object of this session.
*
...
...
@@ -98,6 +100,12 @@ class Handler {
$fs
->
symlink
(
$rel
.
$item
,
$moduleRoot
.
"/
$item
"
);
}
}
// Prepare GitLab CI file.
$gitlabCiFile
=
$projectRoot
.
'/.gitlab-ci.yml'
;
if
(
!
$fs
->
exists
(
$gitlabCiFile
))
{
$fs
->
dumpFile
(
$gitlabCiFile
,
$this
->
defaultGitLabCi
());
}
}
/**
...
...
@@ -187,4 +195,19 @@ class Handler {
];
}
/**
* Get default GitLab CI instructions for DrupalSpoons.
*
* @return string
*/
protected
function
defaultGitLabCi
():
string
{
$version
=
self
::
DRUPAL_SPOONS_VERSION
;
return
<<<gitlabci
include:
- project: 'drupalspoons/webmasters'
ref: $version
file: 'templates/.gitlab-ci.yml'
gitlabci;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment