add missing deploy script
This commit is contained in:
parent
0ebf0c9960
commit
b1c639cf9f
@ -5,7 +5,7 @@
|
|||||||
"short_description": "Adds multiple spawner blocks. There ara no ABM's used and this modpack is developed with focus on the best multiplayer online server performace.",
|
"short_description": "Adds multiple spawner blocks. There ara no ABM's used and this modpack is developed with focus on the best multiplayer online server performace.",
|
||||||
"dev_state": "MAINTENANCE_ONLY",
|
"dev_state": "MAINTENANCE_ONLY",
|
||||||
"tags": [
|
"tags": [
|
||||||
"decorative",
|
"mobs",
|
||||||
"survival"
|
"survival"
|
||||||
],
|
],
|
||||||
"license": "LGPL-2.1-or-later",
|
"license": "LGPL-2.1-or-later",
|
||||||
|
50
scripts/deploy.js
Normal file
50
scripts/deploy.js
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/**
|
||||||
|
* Deploy code to CDB
|
||||||
|
* Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to juraj.vajda@gmail.com
|
||||||
|
*/
|
||||||
|
|
||||||
|
import fetch from 'node-fetch'
|
||||||
|
import yargs from 'yargs/yargs'
|
||||||
|
import {hideBin} from 'yargs/helpers'
|
||||||
|
|
||||||
|
const argv = yargs(hideBin(process.argv)).argv
|
||||||
|
|
||||||
|
try {
|
||||||
|
const body = {
|
||||||
|
method: 'git',
|
||||||
|
title: argv.title,
|
||||||
|
ref: 'master'
|
||||||
|
}
|
||||||
|
|
||||||
|
const response = await fetch('https://content.minetest.net/api/packages/SaKeL/spawners/releases/new/', {
|
||||||
|
method: 'POST',
|
||||||
|
body: JSON.stringify(body),
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
Authorization: `Bearer ${argv.token}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const data = await response.json()
|
||||||
|
|
||||||
|
console.log(data)
|
||||||
|
|
||||||
|
if (!data.success) {
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
process.exit(1)
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user