Skip to content

deploy falsely claims no strains affected by remote repo #741

@rofe

Description

@rofe

Description
When starting from scratch with a simple demo, following the getting-started.md, hlx deploy will claim that the remote repo won't affect any strains, even though the default strain will be.

To Reproduce
Steps to reproduce the behavior:

  1. hlx demo mydemo
  2. cd mydemo
  3. git remote add origin https://github.com/myname/myproject.git
  4. hlx up --save-config
    Your new helix-config.yaml will now look like this:
#
# helix configuration for local development
#
version: 1

definitions:
  defaults:
    - &localRepo "http://localhost/local/default.git"
    - &defaultRepo "https://github.com/myname/myproject.git"

strains:
  - name: dev
    url: http://localhost:3000/
    code: *localRepo
    content: *localRepo
    static: *localRepo

  - name: default
    code: *defaultRepo
    content: *defaultRepo
    static: *defaultRepo
  1. hlx deploy --dirty
    Observe error output:
error: Remote repository https://github.com/myname/myproject.git#master does not affect any strains.
      
Add a strain definition to your config file:
name: fd3f9d80-8da1-4903-9c07-4565e73c1382
code: https://github.com/myname/myproject.git#master
content: https://github.com/myname/myproject.git
static: https://github.com/myname/myproject.git/htdocs

Alternatively you can auto-add one using the --add <name> option.
null

Expected behavior
hlx deploy should recognize that the default strain is affected, and deploy as expected.

Version:
v0.13.14

Additional context
The workaround is to manually append #master to the &defaultRepo variable in helix-config.yaml, then run hlx deploy again.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreleased

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions