Skip to content

Commit

Permalink
Merge branch '1.x' of github.com:opendevshop/devshop into bug/deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
jonpugh committed Aug 30, 2023
2 parents fd373b5 + 0f1deee commit be47175
Show file tree
Hide file tree
Showing 9 changed files with 968 additions and 372 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/install-sh-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cd install

make build

cat build/install.sh | grep $LOAD_DEVSHOP_VERSION
cat build/install-${LOAD_DEVSHOP_VERSION}.sh | grep $LOAD_DEVSHOP_VERSION

# Rebuild a base container to include this PR's systemd scripts.
docker build . --file Dockerfile.${OS} --tag ubuntu/container
Expand All @@ -32,7 +32,7 @@ docker run \
--detach --privileged --rm \
--hostname $DEVSHOP_SERVER_HOSTNAME \
--publish 80:80 \
--volume $PWD/build/install.sh:/tmp/devshop-install.sh \
--volume $PWD/build/install-${LOAD_DEVSHOP_VERSION}.sh:/tmp/devshop-install.sh \
--tty \
ubuntu/container

Expand Down
31 changes: 15 additions & 16 deletions RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ public function release($version = NULL, $drupal_org_version = NULL) {

$not_ready = TRUE;
while ($not_ready) {
$not_ready = !$this->confirm("Are you absolutely sure all contrib modules and drupal core are up to date in ./aegir-home/devmaster-1.x/profiles/devmaster/devmaster.make?? Go check. I'll wait.");
$not_ready = !$this->confirm("Are you absolutely sure all contrib modules and drupal core are up to date in ./composer.json & ./src/DevShop/Control/composer.json?? Go check. I'll wait.");
}

$not_ready = TRUE;
Expand All @@ -915,16 +915,17 @@ public function release($version = NULL, $drupal_org_version = NULL) {
file_put_contents('./devmaster/VERSION.txt', $version);
}

if ($this->confirm("Write '$version' to install.sh? ")) {
$this->_exec("sed -i -e 's/DEVSHOP_VERSION=1.x/DEVSHOP_VERSION=$version/' ./install.sh");
}

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("Create install script for version? ")) {
$this->_exec("cd install && LOAD_SCRIPT_DEVSHOP_VERSION_REF=$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 @@ -938,14 +939,12 @@ public function release($version = NULL, $drupal_org_version = NULL) {
// Tag devshop and devmaster with $version and drupal_org_tag.
$this->taskGitStack()
->tag($version, "DevShop $version")
->tag($drupal_org_tag, "DevShop Devmaster $version")
->run();
}

if ($this->confirm("Push the new release tags $version and $drupal_org_version?")) {
if (!$this->taskGitStack()
->push("origin", $version)
->push("origin", $drupal_org_tag)
->run()
->wasSuccessful()
) {
Expand All @@ -954,12 +953,12 @@ public function release($version = NULL, $drupal_org_version = NULL) {
}

$this->say("The final steps we still have to do manually:");
$this->say("1. Go create a new release of devmaster: https://www.drupal.org/node/add/project-release/1779370 using the tag $drupal_org_tag");
$this->say("2. Wait for drupal.org to package up the distribution: https://www.drupal.org/project/devmaster");
$this->say("3. Create a new 'release' on GitHub: https://github.com/opendevshop/devshop/releases/new using tag $version. Copy CHANGELOG from https://raw.githubusercontent.com/opendevshop/devshop/1.x/CHANGELOG.md");
// $this->say("1. Go create a new release of devmaster: https://www.drupal.org/node/add/project-release/1779370 using the tag $drupal_org_tag");
// $this->say("2. Wait for drupal.org to package up the distribution: https://www.drupal.org/project/devmaster");
$this->say("1. Create a new 'release' on GitHub: https://github.com/opendevshop/devshop/releases/new using tag $version. Copy CHANGELOG from https://raw.githubusercontent.com/opendevshop/devshop/1.x/CHANGELOG.md");
$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("4. Put the new version in gh-pages branch index.html");
$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");
Expand Down
Loading

0 comments on commit be47175

Please sign in to comment.