DerSkythe 2 лет назад
Родитель
Сommit
6d6f174d3f

+ 13 - 1
.github/check-version.ps1

@@ -7,6 +7,7 @@ $ErrorActionPreference = "Stop"        #
 [string]$ReleaseVersion = $args[1]
 [string]$RepoSelf = $args[2]
 [string]$RepoUnleashed = $args[3]
+[bool]$ForGithubActions = $true
 
 ################################################################################################################################
 function CleanInput
@@ -125,4 +126,15 @@ else
 }
 
 $Output.CurrentTag = $LatestTag
-$Output
+
+if($ForGithubActions) {
+    $Plain = New-Object -TypeName "System.Text.StringBuilder";
+    $Output.GetEnumerator() | ForEach-Object {
+        [void]$Plain.Append($_.Key)
+        [void]$Plain.Append('=')
+        [void]$Plain.AppendLine($_.Value)
+    }
+    Write-Output $Plain.ToString()
+} else {
+    $Output
+}

+ 7 - 6
.github/workflows/version-check.yml

@@ -38,12 +38,13 @@ jobs:
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
-          $Output = ('& $env:GITHUB_ACTION_PATH/.github/check-version.ps1')
-          Write-Output("RELEASE_VERSION=$($Output.ReleaseVersion)") >> $env:GITHUB_ENV
-          Write-Output("CURRENT_TAG=$($Output.CurrentTag)") >> $env:GITHUB_ENV
-          Write-Output("REMOTE_TAG_INFO=$($Output.RemoteTagInfo)") >> $env:GITHUB_ENV
-          Write-Output("RELEASE_TYPE=$($Output.ReleaseType)") >> $env:GITHUB_ENV
-
+          '& $env:GITHUB_ACTION_PATH/.github/check-version.ps1 "${{ env.FIRMWARE_VERSION }}" "${{ env.RELEASE_VERSION }}" "${{ env.REPO_SELF }}" "${{ env.REPO_UNLEASHED }}"' `
+            | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
+#          $Output = ('& $env:GITHUB_ACTION_PATH/.github/check-version.ps1 "${{ env.FIRMWARE_VERSION }}" "${{ env.RELEASE_VERSION }}" "${{ env.REPO_SELF }}" "${{ env.REPO_UNLEASHED }}"')
+#          Write-Output("RELEASE_VERSION=$($Output.ReleaseVersion)") | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
+#          Write-Output("CURRENT_TAG=$($Output.CurrentTag)") | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
+#          Write-Output("REMOTE_TAG_INFO=$($Output.RemoteTagInfo)") | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
+#          Write-Output("RELEASE_TYPE=$($Output.ReleaseType)") | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
       - name: Update Firmware variable and create UPDATE release if necessary
         if: ${{ success() && env.RELEASE_TYPE == 1 }}
         env:

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+/.idea/.idea.subbrute.dir/.idea/workspace.xml

+ 0 - 136
.idea/.idea.subbrute.dir/.idea/workspace.xml

@@ -1,136 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ChangeListManager">
-    <list default="true" id="f38797aa-9c11-4a19-ac8e-09aa81c5b2ac" name="Changes" comment="" />
-    <option name="SHOW_DIALOG" value="false" />
-    <option name="HIGHLIGHT_CONFLICTS" value="true" />
-    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
-    <option name="LAST_RESOLUTION" value="IGNORE" />
-  </component>
-  <component name="Git.Settings">
-    <option name="PREVIEW_PUSH_ON_COMMIT_AND_PUSH" value="false" />
-    <option name="RECENT_BRANCH_BY_REPOSITORY">
-      <map>
-        <entry key="$PROJECT_DIR$" value="master" />
-      </map>
-    </option>
-    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
-    <option name="WARN_ABOUT_CRLF" value="false" />
-  </component>
-  <component name="GitToolBoxStore">
-    <option name="recentBranches">
-      <RecentBranches>
-        <option name="branchesForRepo">
-          <list>
-            <RecentBranchesForRepo>
-              <option name="branches">
-                <list>
-                  <RecentBranch>
-                    <option name="branchName" value="feat/ci" />
-                    <option name="lastUsedInstant" value="1680003560" />
-                  </RecentBranch>
-                  <RecentBranch>
-                    <option name="branchName" value="master" />
-                    <option name="lastUsedInstant" value="1680003559" />
-                  </RecentBranch>
-                </list>
-              </option>
-              <option name="repositoryRootUrl" value="file://$PROJECT_DIR$" />
-            </RecentBranchesForRepo>
-          </list>
-        </option>
-      </RecentBranches>
-    </option>
-  </component>
-  <component name="MarkdownSettingsMigration">
-    <option name="stateVersion" value="1" />
-  </component>
-  <component name="ProjectId" id="2NdkrBy1WNws4uTxpIr1xf1mNkt" />
-  <component name="ProjectViewState">
-    <option name="hideEmptyMiddlePackages" value="true" />
-    <option name="showLibraryContents" value="true" />
-  </component>
-  <component name="PropertiesComponent"><![CDATA[{
-  "keyToString": {
-    "RunOnceActivity.OpenProjectViewOnStart": "true",
-    "RunOnceActivity.ShowReadmeOnStart": "true",
-    "WebServerToolWindowFactoryState": "false",
-    "settings.editor.selected.configurable": "preferences.pluginManager"
-  },
-  "keyToStringList": {
-    "rider.external.source.directories": [
-      "C:\\Users\\Skif\\AppData\\Local\\JetBrains\\Shared\\vAny\\DecompilerCache",
-      "C:\\Users\\Skif\\AppData\\Local\\JetBrains\\Shared\\vAny\\SourcesCache",
-      "C:\\Users\\Skif\\AppData\\Local\\Symbols\\src"
-    ]
-  }
-}]]></component>
-  <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
-  <component name="SshConsoleOptionsProvider">
-    <option name="myEncoding" value="UTF-8" />
-    <option name="myConnectionType" value="NONE" />
-    <option name="myConnectionId" value="" />
-  </component>
-  <component name="TaskManager">
-    <task active="true" id="Default" summary="Default task">
-      <changelist id="f38797aa-9c11-4a19-ac8e-09aa81c5b2ac" name="Changes" comment="" />
-      <created>1680001542466</created>
-      <option name="number" value="Default" />
-      <option name="presentableId" value="Default" />
-      <updated>1680001542466</updated>
-      <workItem from="1680001545311" duration="156000" />
-      <workItem from="1680001723598" duration="121000" />
-      <workItem from="1680001863890" duration="2445000" />
-    </task>
-    <task id="LOCAL-00001" summary="feat: moved to pwsh scripts from yaml and fix invalid new version number">
-      <created>1680003671452</created>
-      <option name="number" value="00001" />
-      <option name="presentableId" value="LOCAL-00001" />
-      <option name="project" value="LOCAL" />
-      <updated>1680003671452</updated>
-    </task>
-    <task id="LOCAL-00002" summary="feat: moved to pwsh scripts from yaml and fix invalid new version number">
-      <created>1680003783246</created>
-      <option name="number" value="00002" />
-      <option name="presentableId" value="LOCAL-00002" />
-      <option name="project" value="LOCAL" />
-      <updated>1680003783246</updated>
-    </task>
-    <task id="LOCAL-00003" summary="feat: moved to pwsh scripts from yaml and fix invalid new version number">
-      <created>1680003893089</created>
-      <option name="number" value="00003" />
-      <option name="presentableId" value="LOCAL-00003" />
-      <option name="project" value="LOCAL" />
-      <updated>1680003893089</updated>
-    </task>
-    <task id="LOCAL-00004" summary="feat: moved to pwsh scripts from yaml and fix invalid new version number">
-      <created>1680004121686</created>
-      <option name="number" value="00004" />
-      <option name="presentableId" value="LOCAL-00004" />
-      <option name="project" value="LOCAL" />
-      <updated>1680004121686</updated>
-    </task>
-    <task id="LOCAL-00005" summary="feat: moved to pwsh scripts from yaml and fix invalid new version number">
-      <created>1680004315497</created>
-      <option name="number" value="00005" />
-      <option name="presentableId" value="LOCAL-00005" />
-      <option name="project" value="LOCAL" />
-      <updated>1680004315497</updated>
-    </task>
-    <option name="localTasksCounter" value="6" />
-    <servers />
-  </component>
-  <component name="TypeScriptGeneratedFilesManager">
-    <option name="version" value="3" />
-  </component>
-  <component name="VcsManagerConfiguration">
-    <option name="CHECK_NEW_TODO" value="false" />
-    <option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
-    <MESSAGE value="feat: moved to pwsh scripts from yaml and fix invalid new version number" />
-    <option name="LAST_COMMIT_MESSAGE" value="feat: moved to pwsh scripts from yaml and fix invalid new version number" />
-  </component>
-  <component name="XSLT-Support.FileAssociations.UIState">
-    <expand />
-    <select />
-  </component>
-</project>