Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
35 changes: 33 additions & 2 deletions .github/workflows/trigger_azdo_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,35 @@ jobs:
name: Trigger Main CI
runs-on: windows-latest
steps:
- name: Checkout Repo
uses: actions/checkout@4

- name: Extract version values
id: get_version
run: |
version_major=$(sed -n 's/set(version_major \([0-9]*\))/\1/p' project-meta-info.cmake)
version_minor=$(sed -n 's/set(version_minor \([0-9]*\))/\1/p' project-meta-info.cmake)
version_update=$(sed -n 's/set(version_update \([0-9]*\))/\1/p' project-meta-info.cmake)
echo "version_major=$version_major" >> $GITHUB_OUTPUT
echo "version_minor=$version_minor" >> $GITHUB_OUTPUT
echo "version_update=$version_update" >> $GITHUB_OUTPUT

- name: Trigger Main CI
uses: Azure/[email protected]
if: ${{ github.repository == 'ni/grpc-device' && github.event.workflow_run.head_branch == 'main' }}
with:
azure-devops-project-url: 'https://dev.azure.com/ni/DevCentral'
azure-pipeline-name: 'ni-central-grpc_device'
azure-devops-token: ${{ secrets.AZDO_PIPELINE_TRIGGERS }}
azure-pipeline-variables: '{"BRANCH": "main", "EXPORT_NAME": "ni-grpc-device", "PHASE": "d"}'
azure-pipeline-variables: |
{
"BRANCH": "main",
"EXPORT_NAME": "ni-grpc-device",
"PHASE": "d",
"VERSION_MAJOR": "${{ steps.get_version.outputs.version_major }}",
"VERSION_MINOR": "${{ steps.get_version.outputs.version_minor }}",
"VERSION_UPDATE": "${{ steps.get_version.outputs.version_update }}"
}

- name: Trigger Release CI
uses: Azure/[email protected]
Expand All @@ -31,4 +52,14 @@ jobs:
azure-devops-project-url: 'https://dev.azure.com/ni/DevCentral'
azure-pipeline-name: 'ni-central-grpc_device'
azure-devops-token: ${{ secrets.AZDO_PIPELINE_TRIGGERS }}
azure-pipeline-variables: '{"BRANCH": "releases", "EXPORT_NAME": "ni-grpc-device", "PHASE": "f", "RELEASE_BRANCH_OPTION": "--release-branch"}'
azure-pipeline-variables: |
{
"BRANCH": "main",
"EXPORT_NAME": "ni-grpc-device",
"PHASE": "f",
"RELEASE_BRANCH_OPTION": "--release-branch"
"VERSION_MAJOR": "${{ steps.get_version.outputs.version_major }}",
"VERSION_MINOR": "${{ steps.get_version.outputs.version_minor }}",
"VERSION_UPDATE": "${{ steps.get_version.outputs.version_update }}"
}

5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
cmake_minimum_required(VERSION 3.18.0)

# Include project variables
include("${CMAKE_CURRENT_LIST_DIR}/project-meta-info.cmake")

project(ni_grpc_device_server
LANGUAGES C CXX
VERSION 2.13.0)
VERSION ${version_major}.${version_major}.${version_update})

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

Expand Down
3 changes: 3 additions & 0 deletions project-meta-info.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set(version_major 2)
set(version_minor 13)
set(version_update 0)