Skip to content

Commit

Permalink
Add a parser to get the version of the .sp plugin (#4)
Browse files Browse the repository at this point in the history
* Add a parser for plugin versions

* Added webpack to bundle the files

* Fix https to http redirect error
  • Loading branch information
Sarrus1 authored Oct 8, 2021
1 parent 52bce41 commit 15e37fb
Show file tree
Hide file tree
Showing 270 changed files with 108 additions and 33,011 deletions.
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This action sets-up, cache and adds sourcemod scripting directory to the path

See [action.yml](https://github.com/rumblefrog/setup-sp/blob/master/action.yml)

Basic:
## Basic:

```yaml
steps:
Expand All @@ -21,7 +21,7 @@ steps:
- run: spcomp -iAnotherIncludeDirectory plugin.sp -o output/plugin.smx
```
Matrix:
## Matrix:
```yaml
jobs:
Expand All @@ -42,3 +42,28 @@ jobs:

- run: spcomp -iAnotherIncludeDirectory plugin.sp -o output/plugin.smx
```
## Extract the version of the .sp file:
```yaml
jobs:
build:
runs-on: ubuntu-latest

name: SM version ${{ matrix.sm-version }}
steps:
- uses: actions/checkout@v1

- name: Setup SP
id: setup_sp
uses: rumblefrog/setup-sp@master
with:
version: '1.10.x'
version-file: ./plugin.sp

- run: |
spcomp -iAnotherIncludeDirectory plugin.sp -o output/plugin.smx
echo Plugin version ${{ steps.setup_sp.outputs.plugin-version }}
```
A complete workflow example can be found [here](https://github.com/Sarrus1/DiscordWebhookAPI/blob/master/.github/workflows/master.yml).
10 changes: 10 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@ inputs:
description: 'Version of SP compiler'
required: true
default: '1.10.x'
version-file:
description: 'File to parse to get the version of the plugin'
required: false
default: ''
define-name:
description: 'Name of the define for the version of the plugin if you are using one'
required: false
default: ''
outputs:
version:
description: 'Version of the SP compiler used'
version-file:
description: 'Version of the .sp file'
runs:
using: 'node12'
main: 'lib/index.js'
Expand Down
46 changes: 1 addition & 45 deletions lib/index.js

Large diffs are not rendered by default.

49 changes: 0 additions & 49 deletions lib/installer.js

This file was deleted.

40 changes: 0 additions & 40 deletions lib/structures/versioning.js

This file was deleted.

6 changes: 0 additions & 6 deletions lib/utils/constants.js

This file was deleted.

69 changes: 0 additions & 69 deletions lib/utils/scraper.js

This file was deleted.

15 changes: 0 additions & 15 deletions node_modules/.bin/semver

This file was deleted.

7 changes: 0 additions & 7 deletions node_modules/.bin/semver.cmd

This file was deleted.

15 changes: 0 additions & 15 deletions node_modules/.bin/uuid

This file was deleted.

7 changes: 0 additions & 7 deletions node_modules/.bin/uuid.cmd

This file was deleted.

34 changes: 0 additions & 34 deletions node_modules/.yarn-integrity

This file was deleted.

9 changes: 0 additions & 9 deletions node_modules/@actions/core/LICENSE.md

This file was deleted.

Loading

0 comments on commit 15e37fb

Please sign in to comment.