Skip to content

Commit

Permalink
Update release command. (#773)
Browse files Browse the repository at this point in the history
* Fix robo release command.
  • Loading branch information
jonpugh authored Aug 30, 2023
1 parent 7ea1777 commit 178d882
Show file tree
Hide file tree
Showing 4 changed files with 662 additions and 33 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ These are mostly all regressions. All of the little features I created need to b
- Remove Client form on sites.
- Ensure devshop_support widget & connection works.

## DevShop 1.8.0-beta2
### August 30, 2023

- Fix deploy tasks when created by hosting git queue.
- Fix install script problems.
- Create script files with version numbers.
- Add testing for ubuntu 20 and 22.
- Default to PHP 8.1.
- Ensure drush alias is entered when "other drush alias" is selected as source.

## DevShop 1.8.0-beta1
### August 29, 2023

Expand Down
37 changes: 5 additions & 32 deletions RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ public function login($user = 'aegir') {
/**
* Create a new release of DevShop.
*/
public function release($version = NULL, $drupal_org_version = NULL) {
public function release($version = NULL) {

if (empty($version)) {
// @TODO Verify version string.
Expand All @@ -876,23 +876,6 @@ public function release($version = NULL, $drupal_org_version = NULL) {
$this->release();
return;
}

if (empty($drupal_org_version)) {
$drupal_org_version = $this->ask("What should the Drupal.org version be? (Do not include 7.x or the second dot of the semantic version. ie 1.00-rc1 for 1.0.0-rc1)");
}

if (empty($drupal_org_version)) {
$this->release($version);
return;
}

if (!$this->confirm("Are you sure you want the Drupal.org tag to be 7.x-$drupal_org_version?")) {
$this->release();
return;
}

$drupal_org_tag = "7.x-$drupal_org_version";

$this->yell("The new version shall be $version!!!");
$release_branch = "release-{$version}";

Expand All @@ -916,16 +899,9 @@ public function release($version = NULL, $drupal_org_version = NULL) {
}

if ($this->confirm("Create install script for version? ")) {
$this->_exec("cd install && LOAD_SCRIPT_DEVSHOP_VERSION_REF=$version make");
$this->_exec("cd install && BRANCH=$version make");
$this->_exec("git add install/build");
}
//
// if ($this->confirm("Write '$drupal_org_version' to build-devmaster.make and remove development repos? ")) {
// $this->_exec("sed -i -e 's/projects\[devmaster\]\[version\] = 1.x-dev/projects[devmaster][version] = $drupal_org_version/' build-devmaster.make");
// $this->_exec("sed -i -e 's/projects\[devmaster\]\[download\]\[branch\]/; projects[devmaster][download][branch]' build-devmaster.make");
// $this->_exec("sed -i -e 's/projects\[devmaster\]\[download\]\[url\]/; projects[devmaster][download][url]' build-devmaster.make");
// $this->_exec("sed -i -e '/###DEVELOPMENTSTART###/,/###DEVELOPMENTEND###/d' build-devmaster.make");
// }

if ($this->confirm("Show git diff before committing?")) {
$this->_exec("git diff -U1");
Expand All @@ -942,7 +918,7 @@ public function release($version = NULL, $drupal_org_version = NULL) {
->run();
}

if ($this->confirm("Push the new release tags $version and $drupal_org_version?")) {
if ($this->confirm("Push the new release tags $version?")) {
if (!$this->taskGitStack()
->push("origin", $version)
->run()
Expand All @@ -959,11 +935,8 @@ public function release($version = NULL, $drupal_org_version = NULL) {
$this->say(" - Copy CHANGELOG from https://raw.githubusercontent.com/opendevshop/devshop/1.x/CHANGELOG.md");
$this->say(" - Upload install.sh script to release files.");
$this->say("2. Put the new version in gh-pages branch index.html");

if ($this->confirm("Checkout main branch and run `monorepo-builder split` to push current branch and latest tag to all sub-repos?")) {
$this->_exec("git checkout 1.x");
$this->_exec("bin/monorepo-builder split");
}
$this->say("");
$this->say("That's it! Congrats.");
}

/**
Expand Down
2 changes: 1 addition & 1 deletion devmaster/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.x
1.x
Loading

0 comments on commit 178d882

Please sign in to comment.