diff --git a/.forgejo/workflows/compile.yaml b/.forgejo/workflows/compile.yaml index e466511..f0019dd 100644 --- a/.forgejo/workflows/compile.yaml +++ b/.forgejo/workflows/compile.yaml @@ -12,27 +12,27 @@ jobs: PLUGIN: "autoexec" steps: - uses: actions/checkout@v4 - - id: check_file_outdated - name: Check if compiled smx is outdated - run: | - if [ ./plugin/${{ env.PLUGIN }}.sp -nt ./plugin/${{ env.PLUGIN }}.smx ]; then - echo "${{ env.PLUGIN }}.smx is up to date" - echo "outdated=false" >> $GITHUB_OUTPUT - else - echo "${{ env.PLUGIN }}.smx is outdated" - echo "outdated=true" >> $GITHUB_OUTPUT - fi - uses: https://codeberg.org/icewind/attic-action@v1 - if: steps.check_file_outdated.outputs.outdated == 'true' with: name: link instance: https://cache.icewind.link authToken: "${{ secrets.ATTIC_TOKEN }}" - name: Build - if: steps.check_file_outdated.outputs.outdated == 'true' run: nix build && cp -L result ./plugin/${{ env.PLUGIN }}.smx + - id: check_file_outdated + name: Check if compiled smx needs committing + run: | + git status --porcelain + if [ -n "$(git status --porcelain)" ]; then + echo "${{ env.PLUGIN }}.smx is changed" + echo "outdated=true" >> $GITHUB_OUTPUT + else + echo "${{ env.PLUGIN }}.smx is unchanged" + echo "outdated=false" >> $GITHUB_OUTPUT + fi + - name: Commit files if: steps.check_file_outdated.outputs.outdated == 'true' run: | diff --git a/plugin/autoexec.smx b/plugin/autoexec.smx index bc3a088..b2b1e12 100644 Binary files a/plugin/autoexec.smx and b/plugin/autoexec.smx differ diff --git a/plugin/autoexec.sp b/plugin/autoexec.sp index b28a659..0b82c48 100644 --- a/plugin/autoexec.sp +++ b/plugin/autoexec.sp @@ -11,6 +11,7 @@ public Plugin:myinfo = { url = "https://codeberg.org/spire/autoexec/" }; + new StringMap:mapPrefixMap; new StringMap:mapOverwriteMap; new StringMap:mapTypeMap; @@ -79,7 +80,6 @@ public RestoreCfg() { initialized = true; } - public ExecMapCfg() { decl String:config[128]; decl String:map[128];