drupal-composer / drupal-project

:rocket: Composer template for Drupal projects. Quick installation via "composer create-project drupal-composer/drupal-project"
GNU General Public License v2.0
1.56k stars 942 forks source link

Create releases for drupal-project #425

Open grasmash opened 6 years ago

grasmash commented 6 years ago

I'd like to post the following instructions on the /download page on Drupal.org:

composer create-project drupal-composer/drupal-project --stability dev --no-interaction

However, I'd prefer that it require a stable tag for drupal-project rather than asking users to rely on a dev dependency. It seems to be setting a bad example.

Would you be willing to begin cutting tags for drupal-project?

webflo commented 6 years ago

Not relying on dev dependencies is a good thing, and i thought about a tagging releases in the fast. But i had trouble finding the a proper version scheme, that fits. Packagist would show the version of the template not necessarily the version of Drupal core. This mighty be confusing for some users.

feikede commented 6 years ago

Is it possible, to tag this repository (the composer-repo) with the drupal core version? I am building docker containers from your drupal-project (https://hub.docker.com/r/feikede/drupal8-docker/), thanks, but unfortunately it's not possible to have reliable release tags on the containers with a general 8.x-dev tag here (or I need to patch the deps in your composer.json).

gitressa commented 6 years ago

This would also be useful if you want to download an older version to test upgrading.

leymannx commented 6 years ago

Maybe something like DRUPAL-CONCAT.PROJECT.PROJECT?

Although that would mean much more tagging. And probably fixating the Drupal version in the composer.json. Bad.

Then maybe DRUPAL-MAJOR-MINOR-CONCAT.ZERO.PROJECT?

leymannx commented 6 years ago

Or would fixating the Drupal version for every release be a desired thing?

This would also be useful if you want to download an older version to test upgrading.

leymannx commented 6 years ago

On the other hand. Starting with just 1.0.0 should be fine for drupal-project, no? Confusion with Drupal versions should be minimal as long as drupal-project doesn't make big jumps too fast.

AlexSkrypnyk commented 6 months ago

The requirements for versioning are:

  1. Be able to pin-point to a specific change set (kinda what versioning is by definition).
  2. Be able to release a patch version
  3. Be able to distinguish what major version of Drupal the release applies to.

Note that using DRUPAL-CONCAT is not needed as we are not supporting per-core patch releases in this project - we want to be able to release independently of the core realeases.

Format candidates:

  1. CORE_MAJOR.x-MAJOR-MINOR-PATCH => 10.x-1.2.3 - most explicit
  2. CORE_MAJOR.x-MINOR-PATCH => 10.x-2.3 - this project already has a branch per core, so using core version as major unifies this. Using .x suffix is in alignment with how contribs used to be versioned. But this could be confusing as what 2 and 3 mean - the MAJOR or MINOR?
  3. CORE_MAJOR-MAJOR-MINOR-PATCH => 10-1.2 - as above, but without .x since this is not a contrib. Same problems with understanding of the versions still remain.
  4. CORE_MAJOR-MINOR-PATCH -> 10.1.2 - core version IS the major version of this repo. This may be confusing for some users as they may think that 1.2 are the MINOR and PATCH of core.

To me, the most unambiguous format is CORE_MAJOR.x-MAJOR-MINOR-PATCH => 10.x-1.2.3

leymannx commented 6 months ago

Yeah, I like 10.x-1.2.3, as it also clearly translates to branch-major.minor.patch.

AlexSkrypnyk commented 6 months ago

@leymannx what would be the very first release version?

I suggest tagging as 10.x-1.0.0 and 11.x-1.0.0 (once we have a full feature set, of course).

Alternatively, we can start from minor: 10.x-0.1.0 and 11.x-0.1.0

webflo commented 6 months ago

Tagging is good, but the version number should be SemVer compliant. Otherwise it will not appear on Packagist and therefore cannot be used with ‘composer create-project’.

leymannx commented 6 months ago

@webflo – Ah I tried this https://jubianchi.github.io/semver-check/#/version/10.x-1.0.0 and it said "green" but I guess that's a false positive.

@AlexSkrypnyk – I also prefer SemVer and if 10.x-1.0.0 is not SemVer compliant we should find something else. 🤔

AlexSkrypnyk commented 6 months ago

The other alternative is to follow Drupal core - option 4 from the list bove

CORE_MAJOR-MINOR-PATCH -> 10.1.2 - core version IS the major version of this repo. This may be confusing for some users as they may think that 1.2 are the MINOR and PATCH of core.

leymannx commented 6 months ago

What about some strange major version something like 1010 or 10010 (and 1008, 1009, 10011 etc.)?

leymannx commented 6 months ago

Some numeric pattern that reflects 10.x-10 how could that look like?

leymannx commented 6 months ago

Something that avoids the confusion that we follow core.

webflo commented 6 months ago

https://github.com/webflo/drupal-project-test has tag "10.x-1.0.0" and it does not work on packagist https://packagist.org/packages/webflo/drupal-project-test

simesy commented 6 months ago

Make this repo the dev repo and package it up or sync it to another repo when you do a release.

leymannx commented 5 months ago

This doesn't help with the version naming.

leymannx commented 5 months ago

The recommended template also has no releases, right?

AlexSkrypnyk commented 5 months ago

Linking SemVer definition https://semver.org/#backusnaur-form-grammar-for-valid-semver-versions

Since Packagist is out of our control and it only allows SemVer, we can only solve this within SemVer format.

They are saying that it is "strongly encouraged", but practically, based on the tests done above, it looks like they do not support anything more complex.

Packagist

Looking at what has been proposed in this thread, to me, CORE_MAJOR.MINOR.PATCH -> 10.1.2, looks like the easiest to use and to maintain.

We can add a line to README.md that release versioning follows Drupal core major version. At the end of the day, this project depends on Drupal core.

AlexSkrypnyk commented 5 months ago

I've created this question in Packagist repo (feel free to jump in there to explain things better) https://github.com/composer/packagist/issues/1451

webflo commented 5 months ago

SemVer build metadata works on Packagist. https://packagist.org/packages/webflo/drupal-project-test#11+1.0.0

We could try use use [CORE-MAJOR]+[OUR-Version-Number].

AlexSkrypnyk commented 5 months ago

@webflo I like the idea and have nothing agains a plus in the version. But.

This actually turns our version into build metadata, making it ignored when determining versions precedence. This may have other side effects that depend on a specific implementation of the spec by Packagist.org

https://semver.org/#spec-item-10

Cursor_and_Semantic_Versioning_2_0_0___Semantic_Versioning