auto icon indicating copy to clipboard operation
auto copied to clipboard

auto version returns no value and exit code 0

Open travis-crowder-kr opened this issue 4 years ago • 3 comments

auto version returning no value.

NodeJS Version: v14.17.3 Ubuntu 20.04.2 LTS

Environment: ubuntu-20.04 Version: 20210726.1 Included Software: https://github.com/actions/virtual-environments/blob/ubuntu20/20210726.1/images/linux/Ubuntu2004-README.md Image Release: https://github.com/actions/virtual-environments/releases/tag/ubuntu20%2F20210726.1

.autorc

{
  "plugins": [
    "git-tag"
  ],
  "owner": "qwerty",
  "repo": "hw-qwerty",
  "name": "GitHub Bot",
  "email": "[email protected]",
  "onlyPublishWithReleaseLabel": true
}

Tool install step

- name: Install tools
  run: |
    mkdir -p ~/.local/bin && npm config set prefix '~/.local/' && \
    npm install -g doctoc auto @auto-it/git-tag

Run tool step

- name: Run tools
  run: |
    ~/.local/bin/auto version

Result

No return value

Changed to auto shipit -dq

- name: Run tools
  run: |
    ~/.local/bin/auto shipit -dq

Changed to auto -vv shipit -dq

- name: Run tools
  run: |
    ~/.local/bin/auto -vv shipit -dq

Result

No return value

Getting the exit code

~/.local/bin/auto -vv shipit -dq
  echo "Retval: $?"

Result

0

PR Information

patch and release label applied

Interesting final note

Running our final shipit works just fine and does everything expected.

- name: Create a GitHub release
        # only run against main and NOT a PR (i.e. a merge to main == build release)
        if: ${{ github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }}
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
           ~/.local/bin/auto shipit

Reason for desired bug to be resolve

Looking to get the anticipated version number so I can sed replace versions in example/demo files.

travis-crowder-kr avatar Jul 30 '21 19:07 travis-crowder-kr

Can you post a run of auto version -vv and post the output here? My intuition says that you have a PR with a label that makes auto skip the release.

hipstersmoothie avatar Aug 12 '21 23:08 hipstersmoothie

There is a ton, but the end result is:

ℹ  info      Calculating SEMVER bump using:
 {
  labels: [
    [], [], [], [], [], [], [], [], [], [], [], [],
    [], [], [], [], [], [], [], [], [], [], [], [],
    [], [], [], [], [], [], [], [], [], [], [], [],
    [], [], [], [], [], [], [], [], [], [], [], [],
    [], [], [], [], [], [], [], [], [], [], [], [],
    [], [], [], [], [], [], []
  ],
  versionLabels: Map(6) {
    'major' => [ 'major' ],
    'minor' => [ 'minor' ],
    'patch' => [ 'patch', 'performance' ],
    'skip' => [ 'skip-release' ],
    'release' => [ 'release' ],
    'none' => [ 'internal', 'documentation', 'tests', 'dependencies' ]
  },
  options: { onlyPublishWithReleaseLabel: true }
}
✔  success   Calculated SEMVER bump: 

I am going to turn down debugging now that I have that working and see what it says.

travis-crowder-kr avatar Aug 24 '21 14:08 travis-crowder-kr

Still looking at this, just not a high priority since it seems to be just me having an issue running any of the commands to get the next version in the middle of a pipeline job.

Running auto shipit -d

ℹ  info      Current "Latest Release" on Github: v0.0.28
ℹ  info      Using release notes:
#### 🐛 Bug Fix

- Changed fetch settings for repo due to auto needs ([@travis-crowder-kr](https://github.com/travis-crowder-kr))
- Starting to debug ([@travis-crowder-kr](https://github.com/travis-crowder-kr))

#### ⚠️ Pushed to `main`

- Merge 1b5fb6167d832d40f3d95682e490eee689f96a86 into 1f1bf5d6e6f2654ab1ebee505d1cba9866f814c4 ([@travis-crowder-kr](https://github.com/travis-crowder-kr))

#### Authors: 1

- [@travis-crowder-kr](https://github.com/travis-crowder-kr)
ℹ  info      Would have created a release on GitHub for version: null
●  note      The above version would only get released if ran with "shipit" or a custom script that bumps the version using the "version" command

travis-crowder-kr avatar Aug 26 '21 02:08 travis-crowder-kr