@ludeo/cli 1.2.0 → 1.2.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 +21 -6
- package/dist/ludeo-darwin-amd64 +0 -0
- package/dist/ludeo-darwin-arm64 +0 -0
- package/dist/ludeo-linux-amd64 +0 -0
- package/dist/ludeo-linux-arm64 +0 -0
- package/dist/ludeo-windows-amd64.exe +0 -0
- package/dist/ludeo-windows-arm64.exe +0 -0
- package/package.json +7 -2
- package/scripts/release.js +227 -0
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ npm install -g @ludeo/cli
|
|
|
10
10
|
|
|
11
11
|
Verify the installation:
|
|
12
12
|
```bash
|
|
13
|
-
ludeo
|
|
13
|
+
ludeo version
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Quick Start
|
|
@@ -21,6 +21,11 @@ Get your access token from the Ludeo platform and authenticate:
|
|
|
21
21
|
ludeo auth login --access-token YOUR_ACCESS_TOKEN
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
You can also check your authentication status:
|
|
25
|
+
```bash
|
|
26
|
+
ludeo auth status
|
|
27
|
+
```
|
|
28
|
+
|
|
24
29
|
### 2. Upload Your Build
|
|
25
30
|
Upload your game build with a simple command. The CLI supports three build creation types:
|
|
26
31
|
|
|
@@ -29,7 +34,7 @@ Upload your game build with a simple command. The CLI supports three build creat
|
|
|
29
34
|
# With explicit build-creation-type
|
|
30
35
|
ludeo builds upload \
|
|
31
36
|
--game-id YOUR_GAME_ID \
|
|
32
|
-
--exec-path
|
|
37
|
+
--exec-path game.exe \
|
|
33
38
|
--local-directory ./builds \
|
|
34
39
|
--build-creation-type new \
|
|
35
40
|
--build-type major \
|
|
@@ -40,7 +45,7 @@ ludeo builds upload \
|
|
|
40
45
|
# Or simply omit --build-creation-type (defaults to "new")
|
|
41
46
|
ludeo builds upload \
|
|
42
47
|
--game-id YOUR_GAME_ID \
|
|
43
|
-
--exec-path
|
|
48
|
+
--exec-path game.exe \
|
|
44
49
|
--local-directory ./builds \
|
|
45
50
|
--build-type major \
|
|
46
51
|
--game-version "1.2.3" \
|
|
@@ -51,7 +56,7 @@ ludeo builds upload \
|
|
|
51
56
|
```bash
|
|
52
57
|
ludeo builds upload \
|
|
53
58
|
--game-id YOUR_GAME_ID \
|
|
54
|
-
--exec-path
|
|
59
|
+
--exec-path game.exe \
|
|
55
60
|
--local-directory ./builds \
|
|
56
61
|
--build-creation-type modification \
|
|
57
62
|
--build-type minor \
|
|
@@ -66,7 +71,7 @@ ludeo builds upload \
|
|
|
66
71
|
```bash
|
|
67
72
|
ludeo builds upload \
|
|
68
73
|
--game-id YOUR_GAME_ID \
|
|
69
|
-
--exec-path
|
|
74
|
+
--exec-path game.exe \
|
|
70
75
|
--local-directory ./builds \
|
|
71
76
|
--build-creation-type sdkFree \
|
|
72
77
|
--build-type major \
|
|
@@ -96,6 +101,15 @@ ludeo builds list --game-id YOUR_GAME_ID
|
|
|
96
101
|
|
|
97
102
|
# Get build details
|
|
98
103
|
ludeo builds get --game-id YOUR_GAME_ID --build-id BUILD_ID
|
|
104
|
+
|
|
105
|
+
# Check authentication status
|
|
106
|
+
ludeo auth status
|
|
107
|
+
|
|
108
|
+
# Validate your access token
|
|
109
|
+
ludeo auth validate
|
|
110
|
+
|
|
111
|
+
# Logout when done
|
|
112
|
+
ludeo auth logout
|
|
99
113
|
```
|
|
100
114
|
|
|
101
115
|
## Features
|
|
@@ -124,7 +138,7 @@ npm update -g @ludeo/cli
|
|
|
124
138
|
ludeo auth login --access-token ${{ secrets.LUDEO_ACCESS_TOKEN }}
|
|
125
139
|
ludeo builds upload \
|
|
126
140
|
--game-id ${{ env.GAME_ID }} \
|
|
127
|
-
--exec-path
|
|
141
|
+
--exec-path game.exe \
|
|
128
142
|
--local-directory ./builds \
|
|
129
143
|
--build-creation-type new \
|
|
130
144
|
--build-type major \
|
|
@@ -155,6 +169,7 @@ sudo npm install -g @ludeo/cli
|
|
|
155
169
|
**Authentication errors:**
|
|
156
170
|
- Verify your access token is valid
|
|
157
171
|
- Check token permissions with `ludeo auth status`
|
|
172
|
+
- Validate your token with `ludeo auth validate`
|
|
158
173
|
|
|
159
174
|
**Upload failures:**
|
|
160
175
|
- Ensure your build directory exists and is readable
|
package/dist/ludeo-darwin-amd64
CHANGED
|
Binary file
|
package/dist/ludeo-darwin-arm64
CHANGED
|
Binary file
|
package/dist/ludeo-linux-amd64
CHANGED
|
Binary file
|
package/dist/ludeo-linux-arm64
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ludeo/cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Ludeo CLI - Upload game builds and manage content on the Ludeo platform",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -9,7 +9,12 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "make build-all",
|
|
11
11
|
"postinstall": "node scripts/postinstall.js",
|
|
12
|
-
"prepublishOnly": "npm run build"
|
|
12
|
+
"prepublishOnly": "npm run build",
|
|
13
|
+
"release": "node scripts/release.js",
|
|
14
|
+
"release:patch": "node scripts/release.js patch",
|
|
15
|
+
"release:minor": "node scripts/release.js minor",
|
|
16
|
+
"release:major": "node scripts/release.js major",
|
|
17
|
+
"windows-release": "make windows-release"
|
|
13
18
|
},
|
|
14
19
|
"keywords": [
|
|
15
20
|
"ludeo",
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const { execSync } = require('child_process');
|
|
6
|
+
|
|
7
|
+
// Colors for console output
|
|
8
|
+
const colors = {
|
|
9
|
+
reset: '\x1b[0m',
|
|
10
|
+
bright: '\x1b[1m',
|
|
11
|
+
red: '\x1b[31m',
|
|
12
|
+
green: '\x1b[32m',
|
|
13
|
+
yellow: '\x1b[33m',
|
|
14
|
+
blue: '\x1b[34m',
|
|
15
|
+
magenta: '\x1b[35m',
|
|
16
|
+
cyan: '\x1b[36m'
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
function log(message, color = 'reset') {
|
|
20
|
+
console.log(`${colors[color]}${message}${colors.reset}`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function exec(command, options = {}) {
|
|
24
|
+
try {
|
|
25
|
+
return execSync(command, {
|
|
26
|
+
stdio: 'inherit',
|
|
27
|
+
encoding: 'utf8',
|
|
28
|
+
...options
|
|
29
|
+
});
|
|
30
|
+
} catch (error) {
|
|
31
|
+
log(`❌ Command failed: ${command}`, 'red');
|
|
32
|
+
log(`Error: ${error.message}`, 'red');
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function getCurrentVersion() {
|
|
38
|
+
const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf8'));
|
|
39
|
+
return packageJson.version;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function updateVersion(type) {
|
|
43
|
+
log(`📦 Updating version (${type})...`, 'blue');
|
|
44
|
+
|
|
45
|
+
// Update package.json version
|
|
46
|
+
exec(`npm version ${type} --no-git-tag-version`);
|
|
47
|
+
|
|
48
|
+
const newVersion = getCurrentVersion();
|
|
49
|
+
log(`✅ Version updated to: ${newVersion}`, 'green');
|
|
50
|
+
return newVersion;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function buildAll() {
|
|
54
|
+
log('🔨 Building for all platforms...', 'blue');
|
|
55
|
+
exec('make build-all');
|
|
56
|
+
log('✅ Build completed', 'green');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function publishNPM() {
|
|
60
|
+
log('📤 Publishing to NPM...', 'blue');
|
|
61
|
+
exec('make npm-publish');
|
|
62
|
+
log('✅ Published to NPM successfully', 'green');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function createWindowsRelease(version) {
|
|
66
|
+
log('🪟 Creating Windows release...', 'blue');
|
|
67
|
+
|
|
68
|
+
const releaseDir = `windows-releases/v${version}`;
|
|
69
|
+
|
|
70
|
+
// Create release directory
|
|
71
|
+
exec(`mkdir -p ${releaseDir}`);
|
|
72
|
+
|
|
73
|
+
// Copy Windows binaries
|
|
74
|
+
exec(`cp build/ludeo-windows-amd64.exe ${releaseDir}/`);
|
|
75
|
+
exec(`cp build/ludeo-windows-arm64.exe ${releaseDir}/`);
|
|
76
|
+
|
|
77
|
+
// Update version in documentation files
|
|
78
|
+
updateWindowsDocumentation(version, releaseDir);
|
|
79
|
+
|
|
80
|
+
log(`✅ Windows release created: ${releaseDir}`, 'green');
|
|
81
|
+
return releaseDir;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function updateWindowsDocumentation(version, releaseDir) {
|
|
85
|
+
const files = [
|
|
86
|
+
'README.md',
|
|
87
|
+
'INSTALL.txt',
|
|
88
|
+
'install.bat',
|
|
89
|
+
'install.ps1',
|
|
90
|
+
'PACKAGE_CONTENTS.txt'
|
|
91
|
+
];
|
|
92
|
+
|
|
93
|
+
// Copy template files from previous version or create new ones
|
|
94
|
+
const templateDir = 'windows-releases/template';
|
|
95
|
+
|
|
96
|
+
files.forEach(file => {
|
|
97
|
+
const templatePath = path.join(templateDir, file);
|
|
98
|
+
const targetPath = path.join(releaseDir, file);
|
|
99
|
+
|
|
100
|
+
if (fs.existsSync(templatePath)) {
|
|
101
|
+
let content = fs.readFileSync(templatePath, 'utf8');
|
|
102
|
+
// Replace version placeholders
|
|
103
|
+
content = content.replace(/v1\.2\.0/g, `v${version}`);
|
|
104
|
+
content = content.replace(/1\.2\.0/g, version);
|
|
105
|
+
fs.writeFileSync(targetPath, content);
|
|
106
|
+
} else {
|
|
107
|
+
// Create basic files if templates don't exist
|
|
108
|
+
createBasicWindowsFiles(version, releaseDir, file);
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function createBasicWindowsFiles(version, releaseDir, filename) {
|
|
114
|
+
const content = getBasicFileContent(filename, version);
|
|
115
|
+
fs.writeFileSync(path.join(releaseDir, filename), content);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function getBasicFileContent(filename, version) {
|
|
119
|
+
switch (filename) {
|
|
120
|
+
case 'README.md':
|
|
121
|
+
return `# Ludeo CLI v${version} - Windows Release
|
|
122
|
+
|
|
123
|
+
## Installation
|
|
124
|
+
1. Download the appropriate executable for your system
|
|
125
|
+
2. Add to PATH environment variable
|
|
126
|
+
3. Run: ludeo --version
|
|
127
|
+
|
|
128
|
+
## Support
|
|
129
|
+
- Email: support@ludeo.com
|
|
130
|
+
- Documentation: https://docs.ludeo.com/cli
|
|
131
|
+
`;
|
|
132
|
+
case 'INSTALL.txt':
|
|
133
|
+
return `LUDEO CLI v${version} - WINDOWS INSTALLATION
|
|
134
|
+
|
|
135
|
+
1. Choose the right executable:
|
|
136
|
+
- ludeo-windows-amd64.exe (Intel/AMD)
|
|
137
|
+
- ludeo-windows-arm64.exe (ARM)
|
|
138
|
+
|
|
139
|
+
2. Rename to "ludeo.exe"
|
|
140
|
+
|
|
141
|
+
3. Add to PATH:
|
|
142
|
+
- Copy to C:\\ludeo-cli\\
|
|
143
|
+
- Add C:\\ludeo-cli\\ to PATH
|
|
144
|
+
|
|
145
|
+
4. Test: ludeo --version
|
|
146
|
+
`;
|
|
147
|
+
default:
|
|
148
|
+
return `# Ludeo CLI v${version} - ${filename}`;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function createGitTag(version) {
|
|
153
|
+
log('🏷️ Creating git tag...', 'blue');
|
|
154
|
+
exec(`git add .`);
|
|
155
|
+
exec(`git commit -m "Release v${version}"`);
|
|
156
|
+
exec(`git tag v${version}`);
|
|
157
|
+
log(`✅ Git tag created: v${version}`, 'green');
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function pushToGit() {
|
|
161
|
+
log('📤 Pushing to git...', 'blue');
|
|
162
|
+
exec('git push origin main');
|
|
163
|
+
exec('git push --tags');
|
|
164
|
+
log('✅ Pushed to git successfully', 'green');
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function createZipRelease(releaseDir) {
|
|
168
|
+
log('📦 Creating zip release...', 'blue');
|
|
169
|
+
const zipName = `ludeo-cli-windows-v${getCurrentVersion()}.zip`;
|
|
170
|
+
exec(`cd windows-releases && zip -r ${zipName} v${getCurrentVersion()}/`);
|
|
171
|
+
log(`✅ Zip created: windows-releases/${zipName}`, 'green');
|
|
172
|
+
return zipName;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function main() {
|
|
176
|
+
const args = process.argv.slice(2);
|
|
177
|
+
const releaseType = args[0] || 'patch'; // patch, minor, major
|
|
178
|
+
|
|
179
|
+
if (!['patch', 'minor', 'major'].includes(releaseType)) {
|
|
180
|
+
log('❌ Invalid release type. Use: patch, minor, or major', 'red');
|
|
181
|
+
process.exit(1);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
log('🚀 Starting Ludeo CLI Release Process', 'cyan');
|
|
185
|
+
log('=====================================', 'cyan');
|
|
186
|
+
|
|
187
|
+
try {
|
|
188
|
+
// 1. Update version
|
|
189
|
+
const newVersion = updateVersion(releaseType);
|
|
190
|
+
|
|
191
|
+
// 2. Build all platforms
|
|
192
|
+
buildAll();
|
|
193
|
+
|
|
194
|
+
// 3. Publish to NPM
|
|
195
|
+
publishNPM();
|
|
196
|
+
|
|
197
|
+
// 4. Create Windows release
|
|
198
|
+
const releaseDir = createWindowsRelease(newVersion);
|
|
199
|
+
|
|
200
|
+
// 5. Create git tag and push
|
|
201
|
+
createGitTag(newVersion);
|
|
202
|
+
pushToGit();
|
|
203
|
+
|
|
204
|
+
// 6. Create zip for easy distribution
|
|
205
|
+
const zipName = createZipRelease(releaseDir);
|
|
206
|
+
|
|
207
|
+
log('', 'reset');
|
|
208
|
+
log('🎉 Release completed successfully!', 'green');
|
|
209
|
+
log('================================', 'green');
|
|
210
|
+
log(`📦 NPM Package: @ludeo/cli@${newVersion}`, 'cyan');
|
|
211
|
+
log(`🪟 Windows Release: ${releaseDir}`, 'cyan');
|
|
212
|
+
log(`📁 Zip File: windows-releases/${zipName}`, 'cyan');
|
|
213
|
+
log(`🏷️ Git Tag: v${newVersion}`, 'cyan');
|
|
214
|
+
log('', 'reset');
|
|
215
|
+
log('Next steps:', 'yellow');
|
|
216
|
+
log('1. Test the NPM package: npm install -g @ludeo/cli@latest', 'white');
|
|
217
|
+
log('2. Distribute the Windows zip to developers', 'white');
|
|
218
|
+
log('3. Update any external documentation', 'white');
|
|
219
|
+
|
|
220
|
+
} catch (error) {
|
|
221
|
+
log(`❌ Release failed: ${error.message}`, 'red');
|
|
222
|
+
process.exit(1);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// Run the script
|
|
227
|
+
main();
|