@platforma-open/milaboratories.software-small-binaries 1.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # Repository structure
2
+
3
+ Each go file = single binary.
4
+ This repo intentionally has no go.mod file as it is designed
5
+ for small binary utilities with small implementation.
6
+
7
+ The binary version is detected from `version` in package.json file
8
+
9
+ All binaries have their software descriptors inside NPM package released along with the packages.
10
+ Say, for `sleep` command, there is a `@milaboratories/software-small-binaries:sleep` software descirptor to be used in
11
+ Platforma workflows
12
+
13
+ ## Patching existing binaries
14
+ * Change the code
15
+ * Check it can be built: `go build -o /dev/null ./read-file-to-stdout-with-sleep.go`
16
+ * Bump 2 package versions in `package.json`: the version of NPM package and the version of software package
17
+ (patch or minor, depending on the changes you made)
18
+ * Commit and push changes.
19
+ All updates to the `main` branch with version change in `package.json` are released to registry and NPM
20
+
21
+ ## Adding new binaries
22
+ * Create `.go` file in root directory
23
+ * Write the code.
24
+ * Add new file name (without `.go` extension) to `./scripts/build.sh` and `./scripts/publish.sh`
25
+ * Add new software package into `package.json` (`block-software.packages.<file name>`).
26
+ * Bump package version in `package.json` (minor version, as you added new binary)
27
+ * Commit and push changes.
@@ -0,0 +1 @@
1
+ {"name":"@platforma-open/milaboratories.software-small-binaries:guided-command","binary":{"type":"binary","registry":"platforma-open","package":"platforma-open/milaboratories.software-small-binaries/guided-command/1.0.0-{os}-{arch}.tgz","cmd":["{pkg}/guided-command"],"envVars":[]}}
@@ -0,0 +1 @@
1
+ {"name":"@platforma-open/milaboratories.software-small-binaries:hello-world-py","binary":{"type":"python","registry":"platforma-open","package":"platforma-open/milaboratories.software-small-binaries/hello-world-py/1.0.0.tgz","cmd":["python","{pkg}/hello.py"],"envVars":[],"runEnv":{"name":"@platforma-open/milaboratories.runenv-python-3:3.12.6","type":"python","registry":"platforma-open","package":"platforma-open/milaboratories.runenv-python-3/3.12.6/3.12.6-{os}-{arch}.tgz","binDir":"bin"},"toolset":"pip","dependencies":{"requirements":"requirements.txt"}}}
@@ -0,0 +1 @@
1
+ {"name":"@platforma-open/milaboratories.software-small-binaries:hello-world","binary":{"type":"binary","registry":"platforma-open","package":"platforma-open/milaboratories.software-small-binaries/hello-world/1.0.0-{os}-{arch}.tgz","cmd":["{pkg}/hello-world"],"envVars":[]}}
@@ -0,0 +1 @@
1
+ {"name":"@platforma-open/milaboratories.software-small-binaries:read-file-to-stdout-with-sleep","binary":{"type":"binary","registry":"platforma-open","package":"platforma-open/milaboratories.software-small-binaries/read-with-sleep/1.0.0-{os}-{arch}.tgz","cmd":["{pkg}/read-with-sleep"],"envVars":[]}}
@@ -0,0 +1 @@
1
+ {"name":"@platforma-open/milaboratories.software-small-binaries:runenv-java-stub","runEnv":{"type":"java","registry":"platforma-open","package":"platforma-open/milaboratories.software-small-binaries/runenv-java-stub/1.0.1-{os}-{arch}.tgz","binDir":"bin/"}}
@@ -0,0 +1 @@
1
+ {"name":"@platforma-open/milaboratories.software-small-binaries:runenv-python-stub","runEnv":{"type":"python","registry":"platforma-open","package":"platforma-open/milaboratories.software-small-binaries/runenv-python-stub/1.0.2-{os}-{arch}.tgz","binDir":"bin/"}}
@@ -0,0 +1 @@
1
+ {"name":"@platforma-open/milaboratories.software-small-binaries:sleep","binary":{"type":"binary","registry":"platforma-open","package":"platforma-open/milaboratories.software-small-binaries/sleep/1.0.0-{os}-{arch}.tgz","cmd":["{pkg}/sleep","arg","arg2"],"envVars":[]}}
@@ -0,0 +1 @@
1
+ {"name":"@platforma-open/milaboratories.software-small-binaries:stub-java-script","binary":{"type":"java","registry":"platforma-open","package":"platforma-open/milaboratories.software-small-binaries/stub-java-script/1.0.0.tgz","cmd":["java","got fake java by dependency","pkg={pkg}","java={java}"],"envVars":[],"runEnv":{"name":":runenv-java-stub","type":"java","registry":"platforma-open","package":"platforma-open/milaboratories.software-small-binaries/runenv-java-stub/1.0.1-{os}-{arch}.tgz","binDir":"bin/"}}}
@@ -0,0 +1 @@
1
+ {"name":"@platforma-open/milaboratories.software-small-binaries:stub-python-script","binary":{"type":"python","registry":"platforma-open","package":"platforma-open/milaboratories.software-small-binaries/stub-python-script/1.0.0.tgz","cmd":["python","got fake python by dependency","pkg={pkg}","python={python}"],"envVars":[],"runEnv":{"name":":runenv-python-stub","type":"python","registry":"platforma-open","package":"platforma-open/milaboratories.software-small-binaries/runenv-python-stub/1.0.2-{os}-{arch}.tgz","binDir":"bin/"},"toolset":"pip","dependencies":{"requirements":"requirements.txt"}}}
@@ -0,0 +1 @@
1
+ {"name":"@platforma-open/milaboratories.software-small-binaries:table-converter","binary":{"type":"binary","registry":"platforma-open","package":"platforma-open/milaboratories.software-small-binaries/table-converter/1.2.0-{os}-{arch}.tgz","cmd":["{pkg}/table-converter"],"envVars":[]}}
package/package.json ADDED
@@ -0,0 +1,216 @@
1
+ {
2
+ "name": "@platforma-open/milaboratories.software-small-binaries",
3
+ "version": "1.13.2",
4
+ "description": "Small cross-platform binaries, like 'sleep' or 'hello-world', suitable for test needs",
5
+ "scripts": {
6
+ "cleanup": "rm -rf ./pkg-*.tgz && rm -rf ./build/ && rm -rf ./dist/",
7
+ "build": "npm run pkg:build && npm run descriptors:build",
8
+ "test": "./scripts/test.sh",
9
+
10
+ "pkg:build": "./scripts/build.sh",
11
+ "pkg:sign": "pl-pkg sign --all-platforms --sign-command='[\"gcloud-kms-sign\", \"{pkg}\", \"{pkg}.sig\"]'",
12
+ "pkg:publish": "pl-pkg publish packages --all-platforms --skip-existing-packages",
13
+
14
+ "descriptors:b:runenv": "pl-pkg build descriptors --entrypoint runenv-python-stub --entrypoint runenv-java-stub",
15
+ "descriptors:build": "npm run descriptors:b:runenv && pl-pkg build descriptors",
16
+ "descriptors:publish": "pl-pkg publish descriptors",
17
+
18
+ "prepublishOnly": "npm run pkg:publish"
19
+ },
20
+ "block-software": {
21
+ "artifacts": {
22
+ "hello-world": {
23
+ "registry": "platforma-open",
24
+ "version": "1.0.0",
25
+ "type": "binary",
26
+ "roots": {
27
+ "linux-x64": "./build/linux-x64/hello-world",
28
+ "linux-aarch64": "./build/linux-aarch64/hello-world",
29
+ "macosx-x64": "./build/macosx-x64/hello-world",
30
+ "macosx-aarch64": "./build/macosx-aarch64/hello-world",
31
+ "windows-x64": "./build/windows-x64/hello-world"
32
+ }
33
+ },
34
+
35
+ "hello-world-py": {
36
+ "registry": "platforma-open",
37
+ "version": "1.0.0",
38
+ "root": "./hello-world-py",
39
+
40
+ "type": "python",
41
+ "environment": "@platforma-open/milaboratories.runenv-python-3:3.12.6",
42
+ "dependencies": {
43
+ "toolset": "pip",
44
+ "requirements": "requirements.txt"
45
+ }
46
+ },
47
+
48
+ "sleep": {
49
+ "registry": "platforma-open",
50
+ "version": "1.0.0",
51
+ "type": "binary",
52
+ "roots": {
53
+ "linux-x64": "./build/linux-x64/sleep",
54
+ "linux-aarch64": "./build/linux-aarch64/sleep",
55
+ "macosx-x64": "./build/macosx-x64/sleep",
56
+ "macosx-aarch64": "./build/macosx-aarch64/sleep",
57
+ "windows-x64": "./build/windows-x64/sleep"
58
+ }
59
+ },
60
+
61
+ "guided-command": {
62
+ "registry": "platforma-open",
63
+ "version": "1.0.0",
64
+ "type": "binary",
65
+ "roots": {
66
+ "linux-x64": "./build/linux-x64/guided-command",
67
+ "linux-aarch64": "./build/linux-aarch64/guided-command",
68
+ "macosx-x64": "./build/macosx-x64/guided-command",
69
+ "macosx-aarch64": "./build/macosx-aarch64/guided-command",
70
+ "windows-x64": "./build/windows-x64/guided-command"
71
+ }
72
+ },
73
+
74
+ "read-with-sleep": {
75
+ "registry": "platforma-open",
76
+ "version": "1.0.0",
77
+ "type": "binary",
78
+ "roots": {
79
+ "linux-x64": "./build/linux-x64/read-with-sleep",
80
+ "linux-aarch64": "./build/linux-aarch64/read-with-sleep",
81
+ "macosx-x64": "./build/macosx-x64/read-with-sleep",
82
+ "macosx-aarch64": "./build/macosx-aarch64/read-with-sleep",
83
+ "windows-x64": "./build/windows-x64/read-with-sleep"
84
+ }
85
+ },
86
+
87
+ "table-converter": {
88
+ "registry": "platforma-open",
89
+ "version": "1.2.0",
90
+ "type": "binary",
91
+ "roots": {
92
+ "linux-x64": "./build/linux-x64/table-converter",
93
+ "linux-aarch64": "./build/linux-aarch64/table-converter",
94
+ "macosx-x64": "./build/macosx-x64/table-converter",
95
+ "macosx-aarch64": "./build/macosx-aarch64/table-converter",
96
+ "windows-x64": "./build/windows-x64/table-converter"
97
+ }
98
+ },
99
+
100
+ "runenv-java-stub": {
101
+ "registry": "platforma-open",
102
+ "version": "1.0.1",
103
+ "type": "environment",
104
+ "runtime": "java",
105
+ "roots": {
106
+ "linux-x64": "./build/linux-x64/runenv-java-stub",
107
+ "linux-aarch64": "./build/linux-aarch64/runenv-java-stub",
108
+ "macosx-x64": "./build/macosx-x64/runenv-java-stub",
109
+ "macosx-aarch64": "./build/macosx-aarch64/runenv-java-stub",
110
+ "windows-x64": "./build/windows-x64/runenv-java-stub"
111
+ },
112
+ "binDir": "bin/"
113
+ },
114
+
115
+ "runenv-python-stub": {
116
+ "registry": "platforma-open",
117
+ "version": "1.0.2",
118
+ "type": "environment",
119
+ "runtime": "python",
120
+ "roots": {
121
+ "linux-x64": "./build/linux-x64/runenv-python-stub",
122
+ "linux-aarch64": "./build/linux-aarch64/runenv-python-stub",
123
+ "macosx-x64": "./build/macosx-x64/runenv-python-stub",
124
+ "macosx-aarch64": "./build/macosx-aarch64/runenv-python-stub",
125
+ "windows-x64": "./build/windows-x64/runenv-python-stub"
126
+ },
127
+ "binDir": "bin/"
128
+ }
129
+ },
130
+ "entrypoints": {
131
+ "runenv-java-stub": {
132
+ "environment": {
133
+ "artifact": "runenv-java-stub"
134
+ }
135
+ },
136
+ "runenv-python-stub": {
137
+ "environment": {
138
+ "artifact": "runenv-python-stub"
139
+ }
140
+ },
141
+ "hello-world": {
142
+ "binary": {
143
+ "artifact": "hello-world",
144
+ "cmd": [ "{pkg}/hello-world" ]
145
+ }
146
+ },
147
+
148
+ "hello-world-py": {
149
+ "binary": {
150
+ "artifact": "hello-world-py",
151
+ "cmd": [ "python", "{pkg}/hello.py" ]
152
+ }
153
+ },
154
+ "sleep": {
155
+ "binary": {
156
+ "artifact": "sleep",
157
+ "cmd": [ "{pkg}/sleep", "arg", "arg2" ]
158
+ }
159
+ },
160
+ "guided-command": {
161
+ "binary": {
162
+ "artifact": "guided-command",
163
+ "cmd": [ "{pkg}/guided-command" ]
164
+ }
165
+ },
166
+ "stub-python-script": {
167
+ "binary": {
168
+ "artifact": {
169
+ "type": "python",
170
+ "registry": "platforma-open",
171
+ "version": "1.0.0",
172
+ "environment": ":runenv-python-stub",
173
+ "dependencies": {
174
+ "toolset": "pip",
175
+ "requirements": "requirements.txt"
176
+ },
177
+ "root": "./python-stub"
178
+ },
179
+ "cmd": [ "python", "got fake python by dependency", "pkg={pkg}", "python={python}" ]
180
+ }
181
+ },
182
+ "stub-java-script": {
183
+ "binary": {
184
+ "artifact": {
185
+ "type": "java",
186
+ "registry": "platforma-open",
187
+ "version": "1.0.0",
188
+ "environment": ":runenv-java-stub",
189
+ "root": "./java-stub"
190
+ },
191
+ "cmd": [ "java", "got fake java by dependency", "pkg={pkg}", "java={java}" ]
192
+ }
193
+ },
194
+ "read-file-to-stdout-with-sleep": {
195
+ "binary": {
196
+ "artifact": "read-with-sleep",
197
+ "cmd": [ "{pkg}/read-with-sleep" ]
198
+ }
199
+ },
200
+ "table-converter": {
201
+ "binary": {
202
+ "artifact": "table-converter",
203
+ "cmd": [ "{pkg}/table-converter" ]
204
+ }
205
+ }
206
+ }
207
+ },
208
+ "files": [
209
+ "dist/"
210
+ ],
211
+ "license": "UNLICENSED",
212
+ "devDependencies": {
213
+ "@platforma-open/milaboratories.runenv-python-3": "^1.0.0",
214
+ "@platforma-sdk/package-builder": "^2.9.2"
215
+ }
216
+ }