Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Scripting releases. #948

Merged
merged 10 commits into from
Jan 10, 2017
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github_changelog_generator
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
project=blt
unreleased-only=true
future-release=8.6.10
pr-label=**Misc merged pull requests**
output=temp-changelog.md
23 changes: 22 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,27 @@ local.properties
auto-save-list
tramp
.\#*
temp*

template/docroot/.csslintrc
template/docroot/.editorconfig
template/docroot/.eslintignore
template/docroot/.eslintrc
template/docroot/.eslintrc.json
template/docroot/.gitattributes
template/docroot/.htaccess
template/docroot/index.php
template/docroot/robots.txt
template/docroot/sites/default/default.settings.php
template/docroot/sites/default/services.yml
template/docroot/sites/default/settings.php
template/docroot/sites/default/default.services.yml
template/docroot/sites/development.services.yml
template/docroot/sites/example.settings.local.php
template/docroot/sites/example.sites.php
template/docroot/update.php
template/docroot/web.config

# PHPStorm
.idea

#XHProf
Expand All @@ -89,3 +108,5 @@ nbproject/*
# generates, so they must be specified here rather than in template/.gitignore.
template/.idea/.name
template/composer.lock

CHANGELOG.partial
80 changes: 17 additions & 63 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
This document outlines the process for creating a new BLT release.

# Testing
To perform a release:

## Prerequisites
1. [Run tests](#testing) locally..
1. [Generate and commit updated CHANGELOG.md](#generate-changelogmd).
1. [Create a release](#create-a-release)

## Testing

### Prerequisites

In order to use these testing instructions:

Expand All @@ -11,67 +17,10 @@ In order to use these testing instructions:
* MySQL must use `mysql://drupal:drupal@localhost/drupal:3306`. If this is not the case, modify the instructions below for your credentials.
* In order to test Drupal VM, you must install VirtualBox and Vagrant. See [Drupal VM](https://github.com/geerlingguy/drupal-vm#quick-start-guide) for more information.

## Procedure

1. Test "Create a new project without acquia/blt-project "from scratch", uses Drupal VM".
1. Test "Update existing project Pipelines project".

## Create a new project via acquia/blt-project, uses local LAMP stack

This test verifies that a new project can be created using `acquia/blt-project` via composer. This also tests the `blt update` process.

export COMPOSER_PROCESS_TIMEOUT=2000
rm -rf blted8
composer create-project acquia/blt-project:8.x-dev blted8 --no-interaction
cd blted8
# Overwrite MySQL creds for your local machine, if necessary.
# echo '$databases["default"]["default"]["username"] = "drupal";' >> docroot/sites/default/settings/local.settings.php
# echo '$databases["default"]["default"]["password"] = "drupal";' >> docroot/sites/default/settings/local.settings.php
blt local:setup
cd docroot
drush uli
read -p "Press any key to continue"

# This updates to the latest dev version.
composer require acquia/blt:8.x-dev
dr uli
read -p "Press any key to continue"
cd ../

## Create a new project without acquia/blt-project "from scratch", uses Drupal VM

This test verifies that a new project can be created from scratch using blt, without blt-project. It also tests Drupal VM integration.

rm -rf blted8
mkdir blted8
cd blted8
git init
composer init --stability=dev --no-interaction
composer config prefer-stable true
composer require acquia/blt:8.x-dev
composer update
blt vm
blt local:setup
drush @blted8.local uli
drush @blted8.local ssh blt tests:behat
read -p "Press any key to continue"
vagrant destroy
cd ../


## Update existing project Pipelines project

composer require acquia/blt:8.x-dev --no-update
composer update
git add -A
git commit -m 'Updating acquia/blt to latest dev version.'
git push origin
pipelines start
pipelines log
# Replace with remote alias
drush @alias ssh blt setup:drupal:install

### Execute tests

./scripts/blt/test-blt.sh [tag]

## Generate CHANGELOG.md

### Prerequisites
Expand All @@ -81,9 +30,14 @@ This test verifies that a new project can be created from scratch using blt, wit
* Procure a [github api token](https://github.com/skywinder/github-changelog-generator#github-token).
* Determine the version of your future release.

### Execute command

Then, generate your release notes via:

github_changelog_generator --token [token] --future-release=[version]
./bin/blt-robo blt:release-notes [tag] [token]

This will update CHANGELOG.md. The information for the new release should be copied and pasted into the GitHub release draft.

## Create a release

./bin/blt-robo blt:release [tag] [token]
28 changes: 28 additions & 0 deletions bin/blt-robo
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env php
<?php

/**
* If we're running from phar load the phar autoload file.
*/
$pharPath = \Phar::running(true);
$consoleRoot = __DIR__ . '/../';
if ($pharPath) {
require_once "$pharPath/vendor/autoload.php";
} else {
if (file_exists($consoleRoot.'/vendor/autoload.php')) {
require_once $consoleRoot.'/vendor/autoload.php';
} elseif (file_exists(__DIR__.'/../../autoload.php')) {
require_once __DIR__ . '/../../autoload.php';
}
}

$commandClasses = [
\Acquia\Blt\Robo\Command\BltInternal::class,
];
$statusCode = \Robo\Robo::run(
$_SERVER['argv'],
$commandClasses,
'BLT',
'0.0.0-alpha0'
);
exit($statusCode);
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,9 @@
"hirak/prestissimo": "^0.3"
},
"minimum-stability": "dev",
"prefer-stable": true
"prefer-stable": true,
"require-dev": {
"consolidation/Robo": "^1.0",
"guzzlehttp/guzzle": "^6.2"
}
}
Loading