Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# This is a basic workflow to help you get started with Actions

name: Build_VIPM_Library
name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
# Triggers the workflow on pull request merged to main
pull_request:
branches:
- main
Expand All @@ -17,31 +15,61 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Build_VIPM_Library:
# The type of runner that the job will run on
# Step 1: Check for broken VIs
Check_Broken_VIs:
runs-on: [self-hosted, lv2017]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4

- name: vipm-InstallPackage
uses: NEVSTOP-LAB/vipm-InstallPackage@main
with:
LabVIEW_Version: 2017
Package: "Git API"

- id: Check_Broken_VIs
continue-on-error: true
uses: LV-APT/lvCICD@main
with:
LabVIEW_Version: 2017
Operation: VIAn_CheckBrokenVIs
Parameter1: ${{ github.workspace }}
Parameter2: NOPASSWORD
Parameter3: YES

- name: Upload VI Analyzer Result
if: always()
uses: actions/upload-artifact@v4
with:
name: VIAn_CheckBrokenVIs_Result
path: ${{ steps.Check_Broken_VIs.outputs.Result }}
if-no-files-found: warn
retention-days: 7

- name: Fail if broken VIs found
if: steps.Check_Broken_VIs.outcome == 'failure'
run: |
Write-Error "Broken VIs detected! Download the 'VIAn_CheckBrokenVIs_Result' artifact for details."
exit 1
shell: powershell

# Step 2: Build VIPM library (only if broken VI check passes)
Build_VIPM_Library:
needs: Check_Broken_VIs
runs-on: [self-hosted, lv2017]
steps:
# Get env variables
# https://github.com/marketplace/actions/github-environment-variables-action
- uses: FranzDiebold/github-env-vars-action@v2

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: vipm-InstallPackage
uses: NEVSTOP-LAB/vipm-InstallPackage@main
with:
LabVIEW_Version: 2017
# Package could be PackageName/PacakgeWithVersion/vipFilePath
Package: "Git API"

# Runs a set of commands using the runners shell
- name: BuildDailyVIP
id: build-vip
uses: LV-APT/lvCICD@main
Expand All @@ -52,23 +80,20 @@ jobs:
Parameter2: NO

- id: vip-name
run:
$vipName=Split-Path -Path ${{ steps.build-vip.outputs.Result }} -Leaf;
Write-Host "::set-output name=vipName::"$vipName""
run: |
$vipName=Split-Path -Path ${{ steps.build-vip.outputs.Result }} -Leaf
"vipName=$vipName" >> $env:GITHUB_OUTPUT
shell: powershell

- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.0.0
uses: actions/upload-artifact@v4
with:
# Artifact name
name: ${{ steps.vip-name.outputs.vipName }}
path: ${{ steps.build-vip.outputs.Result }}
# The desired behavior if no files are found using the provided path.
if-no-files-found: warn
retention-days: 90

# Backup generated files by ftp
# https://github.com/marketplace/actions/simple-ftp-upload
- name: backup Build Artifact by ftp
uses: dennisameling/ftp-upload-action@v1.0.9
with:
Expand All @@ -78,4 +103,4 @@ jobs:
password: ${{ secrets.VIPM_FTP_PASSWORD }}
secure: false
server_dir: /${{ env.CI_REPOSITORY_OWNER_SLUG }}/${{ env.CI_REPOSITORY_NAME }}/${{ env.CI_ACTION_REF_NAME }}/
local_dir: ./vip/
local_dir: ./vip/
38 changes: 0 additions & 38 deletions .github/workflows/Check_Broken_VIs.yml

This file was deleted.

48 changes: 48 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# AGENTS.md �� SimpleGit-Provider

## CMD �蝻���

### 1. `cmd /c` 撘�亦氖�琿

`cmd /c "script.cmd" "arg"` �� 敶� `/c` ���蝚虫葡隞� `"` 撘€憭湔嚗md 隡蝳�**�港葵摮泵銝脩�擐偏 `"`**嚗紡�游��典��琿�銋晞€/S` �����踹�甇方�銝箝€�

**甇�&靚�孵�嚗���嚗�**

```cmd
:: �寞� A �� 雿輻 call嚗��亙ㄝ嚗��祈楝敺�怎征�潘�
cmd /c call "script.cmd" "arg with spaces"

:: �寞� B �� �頝臬�銝�憭�撘嚗�敶楝敺�蝛箸嚗�
cmd /c script.cmd "arg with spaces"
```

��嚗call` 擐�蝚行 `c`嚗�閫血�擐偏撘�亦氖��

### 2. 撘郊�臬 VS Code

`start "" "path\to\Code.exe" %*` �舀�蝞€�舫���甇亙�冽撘€%*` �� `start` �賭誘銵�**��靽���撘颲寧�**嚗蝛箸�楝敺� `"D:\1 2 3"` 隡◤甇�&隡€€�

### 3. �踹���瘜�

| �桅��� | �� |
|----------|------|
| `setlocal EnableDelayedExpansion` + `start` | �� LabVIEW 靚絲�� cmd 銝�質圻��"��韏�銝雲" |
| `for /f` + `reg query` + 蝞⊿�嚗^\|`嚗� | ���臬�銝蓮銋�蝔喳� |
| `set VAR=%*` ���� PowerShell | `set` 撖孵�����瑞��澆����舫� |
| `%*` �湔�澆 `powershell -Command "..."` | cmd 撅��其� PS 撅��典蝒� |
| `shift` + `goto` 敺芰�園�� | ��靚�嫣��航甇餃儐�� |

### 4. VS Code 璉€瘚◇摨�

1. `if exist` 璉€�交���鋆楝敺��嗅��典隞歹�隡�嚗�
- `%LOCALAPPDATA%\Programs\Microsoft VS Code\Code.exe`嚗�瑕�鋆�64-bit嚗�
- `%ProgramW6432%\Microsoft VS Code\Code.exe`嚗頂蝏�鋆�64-bit嚗OW64 摰嚗�
- `%ProgramFiles%\Microsoft VS Code\Code.exe`
- `%ProgramFiles(x86)%\Microsoft VS Code\Code.exe`
2. `where code` 隞���嚗��典隞歹�PATH �之�嗅�質€嚗�

### 5. �霈曇恣��

- **��隡�**嚗 `setlocal`�敺芰�憭�賭誘
- **�曉�喲€€��**嚗�銝芸��� `start` + `exit`嚗�����
- **銝�韏釣�”**嚗if exist` 閬��€����鋆楝敺��
Empty file added GProviders/SimpleGit-config.ini
Empty file.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ Simple git provider for LVAPT daily workflow. Windows of Tortoisegit will be use
## Dependence

- Git API
- OpenG Libraries
- [Tortoisegit](https://tortoisegit.org/)
- [Automating TortoiseGit](https://tortoisegit.org/docs/tortoisegit/tgit-automation.html#tgit-automation-basics)
17 changes: 6 additions & 11 deletions SimpleGit-Provider.lvproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
嚜�<?xml version='1.0' encoding='UTF-8'?>
<Project Type="Project" LVVersion="17008000">
<Property Name="NI.LV.All.SourceOnly" Type="Bool">false</Property>
<Property Name="NI.LV.All.SaveVersion" Type="Str">17.0</Property>
<Property Name="NI.LV.All.SourceOnly" Type="Bool">true</Property>
<Property Name="NI.Project.Description" Type="Str"></Property>
<Property Name="SMProvider.SMVersion" Type="Int">201310</Property>
<Item Name="My Computer" Type="{CEFE1B10-1732-4678-A70A-299293455410}">
Expand All @@ -21,6 +22,9 @@
<Property Name="server.vi.callsEnabled" Type="Bool">true</Property>
<Property Name="server.vi.propertiesEnabled" Type="Bool">true</Property>
<Property Name="specify.custom.address" Type="Bool">false</Property>
<Item Name="_scripts" Type="Folder" URL="../SimpleGit/Git/_scripts">
<Property Name="NI.DISK" Type="Bool">true</Property>
</Item>
<Item Name="support" Type="Folder">
<Item Name="Close Caller FP if In LabVIEW folder.vi" Type="VI" URL="../SimpleGit/Git/_Support/Close Caller FP if In LabVIEW folder.vi"/>
<Item Name="DailyPatchBranchName.vi" Type="VI" URL="../SimpleGit/Git/_Support/DailyPatchBranchName.vi"/>
Expand All @@ -30,6 +34,7 @@
<Item Name="lvgit pull.vi" Type="VI" URL="../SimpleGit/Git/_Support/lvgit pull.vi"/>
<Item Name="lvgit push.vi" Type="VI" URL="../SimpleGit/Git/_Support/lvgit push.vi"/>
<Item Name="lvgit status.vi" Type="VI" URL="../SimpleGit/Git/_Support/lvgit status.vi"/>
<Item Name="menu-operation.lvlib" Type="Library" URL="../SimpleGit/Git/_Support/menu-Operations/menu-operation.lvlib"/>
<Item Name="SimpleGit Setting Dialog.vi" Type="VI" URL="../SimpleGit/Git/_Support/SimpleGit Setting Dialog.vi"/>
<Item Name="SimpleGit-Commit.vi" Type="VI" URL="../SimpleGit/Git/Command/SimpleGit-Commit.vi"/>
<Item Name="SimpleGit-LeaveDailyBranch.vi" Type="VI" URL="../SimpleGit/Git/Command/SimpleGit-LeaveDailyBranch.vi"/>
Expand All @@ -55,15 +60,6 @@
<Item Name="SimpleGit_Global_Interface.vi" Type="VI" URL="../SimpleGit/SimpleGit_Global_Interface.vi"/>
<Item Name="SimpleGit_Item_Interface.vi" Type="VI" URL="../SimpleGit/SimpleGit_Item_Interface.vi"/>
<Item Name="Dependencies" Type="Dependencies">
<Item Name="user.lib" Type="Folder">
<Item Name="1D Array to String__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/string/string.llb/1D Array to String__ogtk.vi"/>
<Item Name="Convert EOLs (String Array)__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/string/string.llb/Convert EOLs (String Array)__ogtk.vi"/>
<Item Name="Convert EOLs (String)__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/string/string.llb/Convert EOLs (String)__ogtk.vi"/>
<Item Name="Convert EOLs__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/string/string.llb/Convert EOLs__ogtk.vi"/>
<Item Name="Current VIs Parents Ref__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/appcontrol/appcontrol.llb/Current VIs Parents Ref__ogtk.vi"/>
<Item Name="End of Line Constant (bug fix).vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/string/string.llb/End of Line Constant (bug fix).vi"/>
<Item Name="String to 1D Array__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/string/string.llb/String to 1D Array__ogtk.vi"/>
</Item>
<Item Name="vi.lib" Type="Folder">
<Item Name="BuildHelpPath.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/BuildHelpPath.vi"/>
<Item Name="Check if File or Folder Exists.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/libraryn.llb/Check if File or Folder Exists.vi"/>
Expand Down Expand Up @@ -119,7 +115,6 @@
<Item Name="LV Config Write Pathlist.vi" Type="VI" URL="/&lt;resource&gt;/dialog/lvconfig.llb/LV Config Write Pathlist.vi"/>
<Item Name="LV Config Write String.vi" Type="VI" URL="/&lt;resource&gt;/dialog/lvconfig.llb/LV Config Write String.vi"/>
<Item Name="LV Config Write.vi" Type="VI" URL="/&lt;resource&gt;/dialog/lvconfig.llb/LV Config Write.vi"/>
<Item Name="menu-operation.lvlib" Type="Library" URL="../SimpleGit/Git/_Support/menu-Operations.llb/menu-operation.lvlib"/>
<Item Name="mxLvDebugDisplayCaller.vi" Type="VI" URL="/&lt;resource&gt;/Framework/Providers/API/mxLvDebugDisplayCaller.vi"/>
<Item Name="mxLvErrorHandler.vi" Type="VI" URL="/&lt;resource&gt;/Framework/Providers/API/mxLvErrorHandler.vi"/>
<Item Name="mxLvGetProjectRef.vi" Type="VI" URL="/&lt;resource&gt;/Framework/Providers/API/mxLvGetProjectRef.vi"/>
Expand Down
Binary file modified SimpleGit/Git/Command/SimpleGit-Commit.vi
Binary file not shown.
Binary file modified SimpleGit/Git/Command/SimpleGit-LeaveDailyBranch.vi
Binary file not shown.
Binary file modified SimpleGit/Git/Command/SimpleGit-Pull.vi
Binary file not shown.
Binary file modified SimpleGit/Git/Command/SimpleGit-Push.vi
Binary file not shown.
Binary file modified SimpleGit/Git/Command/SimpleGit-Settings.vi
Binary file not shown.
Binary file modified SimpleGit/Git/Command/SimpleGit-Status.vi
Binary file not shown.
Binary file modified SimpleGit/Git/Command/SimpleGit-SwitchToDailyBranch.vi
Binary file not shown.
Binary file modified SimpleGit/Git/SimpleGit_Item_OnCommand.vi
Binary file not shown.
Binary file modified SimpleGit/Git/SimpleGit_Item_OnPopupMenu.vi
Binary file not shown.
Binary file modified SimpleGit/Git/SimpleGit_Item_OnUpdateCommand.vi
Binary file not shown.
Binary file modified SimpleGit/Git/SimpleGit_Menu_Hierachy.vi
Binary file not shown.
Binary file modified SimpleGit/Git/SimpleGit_OnCommand(SingleObject).vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/Close Caller FP if In LabVIEW folder.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/DailyPatchBranchName.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/GIT-Current Local Branches.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/Git Check whether Branch exists.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/SimpleGit Setting Dialog.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/config/simplegit.DailyBranchPrefix.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/config/simplegit.TortoiseGitProc.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/lvgit commit.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/lvgit pull.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/lvgit push.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/lvgit status.vi
Binary file not shown.
Binary file removed SimpleGit/Git/_Support/menu-Operations.llb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 12 additions & 0 deletions SimpleGit/Git/_Support/menu-Operations/menu-operation.lvlib
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
嚜�<?xml version='1.0' encoding='UTF-8'?>
<Library LVVersion="17008000">
<Property Name="NI.Lib.Icon" Type="Bin">&amp;Q#!!!!!!!)!"1!&amp;!!!-!%!!!@````]!!!!"!!%!!!(]!!!*Q(C=\&gt;8"=&gt;MQ%!8143;(8.6"2CVM#WJ",7Q,SN&amp;(N&lt;!NK!7VM#WI"&lt;8A0$%94UZ2$P%E"Y.?G@I%A7=11U&gt;M\7P%FXB^VL\`NHV=@X&lt;^39O0^N(_&lt;8NZOEH@@=^_CM?,3)VK63LD-&gt;8LS%=_]J'0@/1N&lt;XH,7^\SFJ?]Z#5P?=F,HP+5JTTF+5`Z&gt;MB$(P+1)YX*RU2DU$(![)Q3YW.YBG&gt;YBM@8'*\B':\B'2Z&gt;9HC':XC':XD=&amp;M-T0--T0-.DK%USWS(H'2\$2`-U4`-U4`/9-JKH!&gt;JE&lt;?!W#%;UC_WE?:KH?:R']T20]T20]\A=T&gt;-]T&gt;-]T?/7&lt;66[UTQ//9^BIHC+JXC+JXA-(=640-640-6DOCC?YCG)-G%:(#(+4;6$_6)]R?.8&amp;%`R&amp;%`R&amp;)^,WR/K&lt;75?GM=BZUG?Z%G?Z%E?1U4S*%`S*%`S'$;3*XG3*XG3RV320-G40!G3*D6^J-(3D;F4#J,(T\:&lt;=HN+P5FS/S,7ZIWV+7.NNFC&lt;+.&lt;GC0819TX-7!]JVO,(7N29CR6L%7,^=&lt;(1M4#R*IFV][.DX(X?V&amp;6&gt;V&amp;G&gt;V&amp;%&gt;V&amp;\N(L@_Z9\X_TVONVN=L^?Y8#ZR0J`D&gt;$L&amp;]8C-Q_%1_`U_&gt;LP&gt;WWPAG_0NB@$TP@4C`%`KH@[8`A@PRPA=PYZLD8Y!#/7SO!!!!!!</Property>
<Property Name="NI.Lib.Version" Type="Str">1.0.0.0</Property>
<Property Name="NI.LV.All.SourceOnly" Type="Bool">true</Property>
<Item Name="menu-AddMenuGroups.vi" Type="VI" URL="../menu-AddMenuGroups.vi"/>
<Item Name="menu-ChangeLocation.vi" Type="VI" URL="../menu-ChangeLocation.vi"/>
<Item Name="menu-InterleaveSeperators.vi" Type="VI" URL="../menu-InterleaveSeperators.vi"/>
<Item Name="menu-ReplaceDotToSlash.vi" Type="VI" URL="../menu-ReplaceDotToSlash.vi"/>
<Item Name="menu-ReplaceSeperatorWith---.vi" Type="VI" URL="../menu-ReplaceSeperatorWith---.vi"/>
<Item Name="menu-SetWeights.vi" Type="VI" URL="../menu-SetWeights.vi"/>
</Library>
Binary file modified SimpleGit/Git/_Support/tortoisegit/Tortoisegit Exists.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/tortoisegit/Tortoisegit commit.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/tortoisegit/Tortoisegit pull.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/tortoisegit/Tortoisegit push.vi
Binary file not shown.
Binary file modified SimpleGit/Git/_Support/tortoisegit/Tortoisegit status.vi
Binary file not shown.
Binary file not shown.
115 changes: 115 additions & 0 deletions SimpleGit/Git/_scripts/Check_if_totoisegit_installed.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
@echo off
setlocal EnableExtensions EnableDelayedExpansion

rem ============================================================================
rem Check_if_totoisegit_installed.cmd
rem ---------------------------------------------------------------------------
rem Detect whether Git and/or TortoiseGit are installed on this machine.
rem ???? Git / TortoiseGit ?????????
rem
rem Usage / ?¯?:
rem Check_if_totoisegit_installed.cmd Check BOTH (Git + TortoiseGit)
rem Check_if_totoisegit_installed.cmd git Check Git only
rem Check_if_totoisegit_installed.cmd tortoisegit Check TortoiseGit only
rem
rem Output (stdout) / ???: TRUE -> installed ????
rem FALSE -> not installed 汛???
rem Exit code / ?????: 0 = TRUE (installed) 1 = FALSE (not installed)
rem ============================================================================

set "target=%~1"
if "%target%"=="" set "target=all"

set "GIT=FALSE"
set "TGIT=FALSE"

call :CheckGit
call :CheckTortoiseGit

set "RESULT=FALSE"
if /i "%target%"=="git" (
set "RESULT=!GIT!"
) else if /i "%target%"=="tortoisegit" (
set "RESULT=!TGIT!"
) else if /i "%target%"=="tgit" (
set "RESULT=!TGIT!"
) else (
rem "all": TRUE only when BOTH Git and TortoiseGit are installed
if "!GIT!"=="TRUE" if "!TGIT!"=="TRUE" set "RESULT=TRUE"
)

echo !RESULT!

if "!RESULT!"=="TRUE" (
exit /b 0
) else (
exit /b 1
)


rem ---------------------------------------------------------------------------
rem :CheckGit -> sets GIT=TRUE when Git is found
rem ---------------------------------------------------------------------------
:CheckGit
rem 1) git.exe available on PATH
where git >nul 2>&1
if not errorlevel 1 (
set "GIT=TRUE"
goto :eof
)
rem 2) Git for Windows registry keys (64-bit and 32-bit views)
for %%K in ("HKLM\SOFTWARE\GitForWindows" "HKLM\SOFTWARE\WOW6432Node\GitForWindows") do (
reg query %%K /v InstallPath >nul 2>&1
if not errorlevel 1 (
set "GIT=TRUE"
goto :eof
)
)
rem 3) Default install locations
if exist "%ProgramFiles%\Git\cmd\git.exe" (
set "GIT=TRUE"
goto :eof
)
if exist "%ProgramW6432%\Git\cmd\git.exe" (
set "GIT=TRUE"
goto :eof
)
if exist "%ProgramFiles(x86)%\Git\cmd\git.exe" (
set "GIT=TRUE"
goto :eof
)
goto :eof


rem ---------------------------------------------------------------------------
rem :CheckTortoiseGit -> sets TGIT=TRUE when TortoiseGit is found
rem ---------------------------------------------------------------------------
:CheckTortoiseGit
rem 1) TortoiseGitProc.exe available on PATH
where TortoiseGitProc >nul 2>&1
if not errorlevel 1 (
set "TGIT=TRUE"
goto :eof
)
rem 2) TortoiseGit registry keys (ProcPath -> TortoiseGitProc.exe)
for %%K in ("HKLM\SOFTWARE\TortoiseGit" "HKLM\SOFTWARE\WOW6432Node\TortoiseGit" "HKCU\SOFTWARE\TortoiseGit") do (
reg query %%K /v ProcPath >nul 2>&1
if not errorlevel 1 (
set "TGIT=TRUE"
goto :eof
)
)
rem 3) Default install locations
if exist "%ProgramFiles%\TortoiseGit\bin\TortoiseGitProc.exe" (
set "TGIT=TRUE"
goto :eof
)
if exist "%ProgramW6432%\TortoiseGit\bin\TortoiseGitProc.exe" (
set "TGIT=TRUE"
goto :eof
)
if exist "%ProgramFiles(x86)%\TortoiseGit\bin\TortoiseGitProc.exe" (
set "TGIT=TRUE"
goto :eof
)
goto :eof
Loading
Loading