Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
357748e
First test of using composite action.
mrbiggred Feb 8, 2022
f680e31
Fix path issue with CI calling composite action.
mrbiggred Feb 8, 2022
f501cbe
Try to fix composite action path.
mrbiggred Feb 8, 2022
c172c48
Try again to fix composite action path.
mrbiggred Feb 8, 2022
1b01fea
Added the release generation workflow.
mrbiggred Feb 10, 2022
ceb9180
Update action versions in GitVersion CI script.
mrbiggred Sep 13, 2022
a9d57c0
Fixed some linting errors.
mrbiggred Sep 13, 2022
787e6e8
Fixed issue with CI release notes not finding version number.
mrbiggred Sep 13, 2022
9f62ce0
Fix typo in release notes CI and only update build version number.
mrbiggred Sep 13, 2022
2728105
Don't increment the version for release builds in CI.
mrbiggred Sep 13, 2022
48b18ec
Remove next version is GitVersion config file.
mrbiggred Sep 13, 2022
c3a23c7
Added GitReleaseManger config for labels.
mrbiggred Sep 13, 2022
a1bb76e
Fix typo in Git Release Manager config file name.
mrbiggred Sep 13, 2022
f66187e
Committing auto generated change log.
mrbiggred Sep 13, 2022
b2d2f16
Trying the Rubocop TargetRubyVersion.
mrbiggred Sep 13, 2022
0b640d2
Testing changes to the Standard linter.
mrbiggred Sep 15, 2022
6afd907
Testing with Standard that has less Ruby requirements.
mrbiggred Sep 15, 2022
b75c31f
Testing Standard with less restrictive Rubocop version.
mrbiggred Sep 15, 2022
0a15dd0
Another test of the Standard gem changes.
mrbiggred Sep 15, 2022
0859bd1
Linting not supported on Ruby 2.5 anymore.
mrbiggred Sep 15, 2022
b5f36bc
See if the Standard updates mean we can remove some ignores.
mrbiggred Sep 15, 2022
d7a8612
Updated the latest Standard fix.
mrbiggred Sep 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/actions/calculate-version/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Calculates the next version number. Assumes
# that the code has already been checked out and that
# the fetch-depth is zero:
#
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
#
# More details: https://gitversion.net/docs/reference/requirements

name: 'Calculate Version'
description: 'Calculate the next version number using GitVersion.'

outputs:
version_formats:
description: 'The various formats for the version. See GitVersion for more details.'
value: ${{ steps.random-number-generator.outputs }}

runs:
using: "composite"
steps:
- name: Install .NET Core 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.13
with:
versionSpec: '5.10.3'

- name: GitVersion Config
uses: gittools/actions/gitversion/execute@v0.9.13
with:
useConfigFile: true
additionalArguments: '/showConfig'

- name: Determine Version
uses: gittools/actions/gitversion/execute@v0.9.13
id: gitversion
with:
useConfigFile: true
36 changes: 9 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

- ruby-version: 2.5.8
bundler-version: 2.2.32
run-linter: true
run-linter: false

- ruby-version: 2.6.6
bundler-version: 2.2.32
Expand Down Expand Up @@ -82,43 +82,25 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # Required for GitVersion
fetch-depth: 0 # Required for Calculate Version step (e.g. GitVersion)

- name: Install .NET Core 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.11
with:
versionSpec: '5.8.1'

- name: GitVersion Config
uses: gittools/actions/gitversion/execute@v0.9.11
with:
useConfigFile: true
additionalArguments: '/showConfig'

- name: Determine Version
uses: gittools/actions/gitversion/execute@v0.9.11
id: gitversion
with:
useConfigFile: true
- name: Calculate Version
id: calculate_version
uses: ./.github/actions/calculate-version

- name: Update the Version
run: |
sed -i 's/.*IDE_VERSION=.*/IDE_VERSION="${{ steps.gitversion.outputs.semver }}"/' lib/ruby-debug-ide/version.rb
sed -i 's/.*IDE_VERSION=.*/IDE_VERSION="${{ steps.calculate_version.outputs.semver }}"/' lib/ruby-debug-ide/version.rb
cat lib/ruby-debug-ide/version.rb

- name: Create Gem
run: |
gem build ruby-debug-ide.gemspec -o corigbytes-ruby-debug-ide-${{ steps.gitversion.outputs.semver }}.gem
gem build ruby-debug-ide.gemspec -o corigbytes-ruby-debug-ide-${{ steps.calculate_version.outputs.semver }}.gem

- name: Upload GitHub Workflow Artifacts
uses: actions/upload-artifact@v2
with:
name: corigbytes-ruby-debug-ide-${{ steps.gitversion.outputs.semver }}.gem
path: corigbytes-ruby-debug-ide-${{ steps.gitversion.outputs.semver }}.gem
name: corigbytes-ruby-debug-ide-${{ steps.calculate_version.outputs.semver }}.gem
path: corigbytes-ruby-debug-ide-${{ steps.calculate_version.outputs.semver }}.gem


49 changes: 49 additions & 0 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Release Notes
on:
push:
branches: [ master, release* ]
pull_request:
branches: [ master, release* ]

defaults:
run:
shell: bash

jobs:
generate-release-notes:
name: Generate Release Notes
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # Required for Calculate Version step (e.g. GitVersion)

- name: Calculate Version
id: calculate_version
uses: ./.github/actions/calculate-version

- name: Install GitReleaseManager
uses: gittools/actions/gitreleasemanager/setup@v0.9.13
with:
versionSpec: '0.13.0'

# If there are no closed issues generating the Github Release will fail because it raises an exception.
# Work around this by checking for success or no closed issue errors.
- name: Create Release ${{ env.MajorMinorPatch }}
run: |
dotnet gitreleasemanager create --owner corgibytes --repository ruby-debug-ide --token ${{ secrets.GITHUB_TOKEN }} --milestone v${{ env.GitVersion_MajorMinorPatch }} --logFilePath output.txt || true
cat output.txt | grep 'No closed issues have been found for milestone\|Drafted release is available at'

- name: 'Generate Change Log'
run: |
dotnet-gitreleasemanager export --token ${{ secrets.GITHUB_TOKEN }} -o 'corgibytes' -r 'ruby-debug-ide' -f 'CHANGELOG.md'
git add --renormalize CHANGELOG.md
cat CHANGELOG.md

- name: 'Commit Change Log if it Changed'
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Committing auto generated change log.
file_pattern: CHANGELOG.md
9 changes: 1 addition & 8 deletions .standard.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
# Oldest version of Ruby supported by the Debugger.
ruby_version: 1.9.3

# Ignore some rules that are only valid in
# newer versions of Ruby.
ignore:
- '**/*':
- Style/SafeNavigation # The & nil check is not available until Ruby 2.3.
- Lint/IncompatibleIoSelectWithFiberScheduler # Couldn't get this recommened fix to work in the interface.rb non_blocking_gets method.
ruby_version: 1.9
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## v0.7.100


As part of this release we had [9 issues](https://github.com/corgibytes/ruby-debug-ide/milestone/1?closed=1) closed.



__DevOps__

- [__#8__](https://github.com/corgibytes/ruby-debug-ide/pull/8) Create Gemfile package in CI

__Enhancements__

- [__#1__](https://github.com/corgibytes/ruby-debug-ide/pull/1) Docker container for development
- [__#2__](https://github.com/corgibytes/ruby-debug-ide/pull/2) Create GitHub CI
- [__#3__](https://github.com/corgibytes/ruby-debug-ide/pull/3) Get latest changes from Ruby Debug IDE origin
- [__#4__](https://github.com/corgibytes/ruby-debug-ide/pull/4) Trigger CI on PR
- [__#5__](https://github.com/corgibytes/ruby-debug-ide/pull/5) Trigger CI on push and PR
- [__#6__](https://github.com/corgibytes/ruby-debug-ide/pull/6) Add fixed port range
- [__#7__](https://github.com/corgibytes/ruby-debug-ide/pull/7) Add Standard lint checker
- [__#9__](https://github.com/corgibytes/ruby-debug-ide/pull/9) Fixed some new linting errors with new version of Rubocop

6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM ruby:2.6.6-slim

# Install build tooks.
RUN apt update && apt install -y build-essential
RUN apt update && apt install -y build-essential git

# Working folder.
RUN mkdir /app
WORKDIR /app

# Setup bundler.
RUN gem update --system 3.1.4 && \
gem install bundler -v 2.1.4
RUN gem update --system 3.3.22 && \
gem install bundler -v 2.3.22

# Entrypoint script will install gems.
COPY docker-entrypoint.sh docker-entrypoint.sh
Expand Down
8 changes: 3 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ group :development, :test do
gem "test-unit"
end

# Minimum Ruby version for Standard. That said the old
# versions of Standard might not support all the features
# such as the to-do file.
if RUBY_VERSION >= "2.2.0"
gem "standard"
# REM
if RUBY_VERSION >= "2.6"
gem "standard", git: "https://github.com/corgibytes/standard", ref: "64ddc304a5df706ede8bbbb3b0483cc67ee65a4a"
end
end
32 changes: 32 additions & 0 deletions GitReleaseManager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
issue-labels-include:
- bug
- devops
- dependencies
- documentation
- enhancement
- security

issue-labels-alias:
- name: bug
header: Bug
plural: Bugs

- name: dependencies
header: Dependencies
plural: Dependencies

- name: devops
header: DevOps
plural: DevOps

- name: documentation
header: Documentation
plural: Documentation

- name: enhancement
header: Enhancement
plural: Enhancements

- name: security
header: Security
plural: Security
78 changes: 73 additions & 5 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,83 @@
assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatch
assembly-informational-format: '{InformationalVersion}'
mode: ContinuousDelivery
increment: Inherit
continuous-delivery-fallback-tag: ci
tag-prefix: '[vV]'
major-version-bump-message: '\+semver:\s?(breaking|major)'
minor-version-bump-message: '\+semver:\s?(feature|minor)'
patch-version-bump-message: '\+semver:\s?(fix|patch)'
no-bump-message: '\+semver:\s?(none|skip)'
legacy-semver-padding: 4
build-metadata-padding: 4
commits-since-version-source-padding: 4
tag-pre-release-weight: 60000
commit-message-incrementing: Enabled
ignore:
sha: [ ]
merge-message-formats: {}
update-build-number: true

branches:
main:
regex: ^master$|^main$
mode: ContinuousDeployment
tag: alpha
increment: Minor
increment: Patch
prevent-increment-of-merged-branch-version: false
track-merge-target: true
source-branches: [ ]
tracks-release-branches: true
is-release-branch: false
is-mainline: false
pre-release-weight: 0
release:
regex: ^releases?[/-]
mode: ContinuousDeployment
tag: beta
increment: Patch
increment: None
prevent-increment-of-merged-branch-version: true
track-merge-target: false
ignore:
sha: []
merge-message-formats: {}
source-branches: [ 'main' ]
tracks-release-branches: false
is-release-branch: true
is-mainline: false
pre-release-weight: 30000
feature:
regex: ^features?[/-]
mode: ContinuousDelivery
tag: useBranchName
increment: Inherit
prevent-increment-of-merged-branch-version: false
track-merge-target: false
source-branches: [ 'main', 'release' ]
tracks-release-branches: false
is-release-branch: false
is-mainline: false
pre-release-weight: 30000
pull-request:
regex: ^(pull|pull\-requests|pr)[/-]
mode: ContinuousDelivery
tag: PullRequest
increment: Inherit
prevent-increment-of-merged-branch-version: false
tag-number-pattern: '[/-](?<number>\d+)[-/]'
track-merge-target: false
source-branches: [ 'main', 'release', 'hotfix' ]
tracks-release-branches: false
is-release-branch: false
is-mainline: false
pre-release-weight: 30000
hotfix:
regex: ^hotfix(es)?[/-]
mode: ContinuousDelivery
tag: useBranchName
increment: Inherit
prevent-increment-of-merged-branch-version: false
track-merge-target: false
source-branches: [ 'release' ]
tracks-release-branches: false
is-release-branch: false
is-mainline: false
pre-release-weight: 30000
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ docker-compose build
Then run the container:

```bash
docker-compose run app bash
docker-compose run --rm app bash
```

Note: The gems are not installed until the container is run and the [docker-entrypoint.sh](docker-entrypoint.sh) is called.
Expand Down
4 changes: 0 additions & 4 deletions lib/ruby-debug-ide.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def find_free_port(host)

# Loop over each port until we find an open port.
possible_port_numbers.each do |ppn|
# rubocop: disable Style/RedundantBegin
begin
print_debug("Checking if port is free: #{ppn}\n")

Expand All @@ -43,7 +42,6 @@ def find_free_port(host)
# another port.
print_debug("Port #{ppn} is in use.\n")
end
# rubocop: enable Style/RedundantBegin
end

# Tried all the ports and couldn't find a free one.
Expand Down Expand Up @@ -164,7 +162,6 @@ def _start_control_common(host, port, socket_path, notify_dispatcher)
return if @control_thread

@control_thread = DebugThread.new do
# rubocop: disable Style/RedundantBegin
begin
if socket_path.nil?
# 127.0.0.1 seemingly works with all systems and with IPv6 as well.
Expand Down Expand Up @@ -213,7 +210,6 @@ def _start_control_common(host, port, socket_path, notify_dispatcher)
$stderr.printf "Fatal exception in DebugThread loop: #{$!.message}\nBacktrace:\n#{bt ? bt.join("\n from: ") : "<none>"}\n"
exit 2
end
# rubocop: enable Style/RedundantBegin
end
end

Expand Down
Loading