Skip to content

Commit 6744669

Browse files
authored
remove standalone check from plugin-kit (#1434)
* remove standalone check from plugin-kit * fix installer script to only use last tag corresponding to station release instead of plugin-kit release * fix build.yml to use correct tag from last station release instead of plugin-kit release * remove doc about standalone
1 parent 36a1a00 commit 6744669

File tree

6 files changed

+37
-20
lines changed

6 files changed

+37
-20
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Set Version
4242
if: ${{ env.VERSION == '' }}
4343
run: |
44-
export VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')-dev
44+
export VERSION=$(git describe --tags --abbrev=0 --match 'v[0-9]*' | sed 's/^v//')-dev
4545
echo "VERSION=$VERSION" >> $GITHUB_ENV
4646
- name: installing dependencies
4747
uses: ./.github/actions/install
@@ -106,7 +106,7 @@ jobs:
106106
- name: Set Version
107107
if: ${{ env.VERSION == '' }}
108108
run: |
109-
export VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')-dev
109+
export VERSION=$(git describe --tags --abbrev=0 --match 'v[0-9]*' | sed 's/^v//')-dev
110110
echo "VERSION=$VERSION" >> $GITHUB_ENV
111111
- name: Sync clock
112112
run: sudo sntp -sS time.windows.com # https://github.com/actions/runner/issues/2996#issuecomment-1833103110
@@ -156,7 +156,7 @@ jobs:
156156
if: ${{ env.VERSION == '' }}
157157
shell: bash
158158
run: |
159-
export VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')
159+
export VERSION=$(git describe --tags --abbrev=0 --match 'v[0-9]*' | sed 's/^v//')
160160
echo "VERSION=$VERSION" >> $GITHUB_ENV
161161
- name: Setup Python
162162
uses: actions/setup-python@v4

README.md

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,46 @@ If you're interested in contributing to MassaStation, please make sure to read o
1616

1717
## Going further
1818

19-
### Modules (plugins)
19+
### Plugins
2020

21-
MassaStation is a module manager. It enables everyone to use, create and enjoy different modules to activate features to the Massa blockchain.
21+
MassaStation is a plugin manager. It enables everyone to use, create and enjoy different plugins to activate features to the Massa blockchain.
2222

23-
#### Install a module
23+
#### Install a plugin
2424

25-
You can install modules that were validated by Massa Labs from the [Module Store](https://station.massa/web/store).
25+
You can install plugins that were validated by Massa Labs from the [Plugin Store](https://station.massa/web/store).
2626

27-
The module will be automatically installed and activated after a few seconds directly in your Station. Browse MassaStation store to find the module you need.
27+
The plugin will be automatically installed and activated after a few seconds directly in your Station. Browse MassaStation store to find the plugin you need.
2828

29-
#### Create a module
29+
#### Create a Plugin
3030

31-
If you are working on a module, you can install it manually to test it using MassaStation:
31+
##### development
32+
If you are working on a plugin, you can use logic from [plugin-kit](./plugin-kit/) go module.
33+
It provides code logic for your plugin to register it-self to Massa Station plugin manager.
34+
Here is how to use it in your plugin:
3235

33-
1. Get the `.zip` file download URL of the module you want to install. Make sure this URL matches the version of MassaStation you are using, your computer OS and architecture.
34-
2. Paste the URL in the `Install a plugin` field of the [module manager page](https://station.massa/web/store).
36+
```golang
37+
pluginKit "github.com/massalabs/station/plugin-kit"
38+
...
39+
40+
listener, err := server.HTTPListener()
41+
if err != nil {
42+
panic(err)
43+
}
44+
45+
pluginKit.RegisterPlugin(listener)
46+
```
47+
48+
##### test
49+
You can install your plugin manually to test it using MassaStation:
50+
51+
1. Get the `.zip` file download URL of the plugin you want to install. Make sure this URL matches the version of MassaStation you are using, your computer OS and architecture.
52+
2. Paste the URL in the `Install a plugin` field of the [plugin manager page](https://station.massa/web/store).
3553
3. Click on the `Install` button.
3654

37-
> **Note:** A complete guide on how to create a module is available [here](https://docs.massa.net/docs/massaStation/guidelines)
55+
56+
> **Note:** A complete guide on how to create a plugin is available [here](https://docs.massa.net/docs/massaStation/guidelines)
57+
58+
3859

3960
## License
4061
Please make sure to read our [Software License](./LICENSE.md)

installer/deb/create_deb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ if [ ! -z "$VERSION" ]; then
105105
# Remove the `v` prefix from the version.
106106
PKGVERSION=$VERSION
107107
else # If $VERSION is not set, use the latest git tag followed by `-dev`
108-
PKGVERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')-dev
108+
PKGVERSION=$(git describe --tags --abbrev=0 --match 'v[0-9]*' | sed 's/^v//')-dev
109109
fi
110110

111111
main

installer/macos/create_pkg.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ if [ ! -z "$VERSION" ]; then
110110
# Remove the `v` prefix from the version.
111111
PKGVERSION=$VERSION
112112
else # If $VERSION is not set, use the latest git tag followed by `-dev`
113-
PKGVERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')-dev
113+
PKGVERSION=$(git describe --tags --abbrev=0 --match 'v[0-9]*' | sed 's/^v//')-dev
114114
fi
115115

116116
main

installer/windows/build_installer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def install_dependencies():
433433
print("Getting version from git tags")
434434
try:
435435
VERSION = subprocess.run(
436-
["git", "describe", "--tags", "--abbrev=0"],
436+
["git", "describe", "--tags", "--abbrev=0", "--match", "v[0-9]*"],
437437
check=True,
438438
capture_output=True,
439439
text=True,

plugin-kit/register.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ type registerBody struct {
2424
}
2525

2626
func RegisterPlugin(listener net.Listener) error {
27-
if os.Getenv(StandaloneEnvVar) == "1" {
28-
return nil
29-
}
30-
3127
minimumNumberOfCLIArgument := 2
3228

3329
if len(os.Args) >= minimumNumberOfCLIArgument {

0 commit comments

Comments
 (0)