release docs readme
This commit is contained in:
@@ -19,7 +19,7 @@ const client = new S3Client({
|
||||
},
|
||||
})
|
||||
|
||||
function getContentType(file) {
|
||||
const getContentType = (file) => {
|
||||
if (file.endsWith('.yml')) return 'text/yaml'
|
||||
if (file.endsWith('.json')) return 'application/json'
|
||||
if (file.endsWith('.AppImage')) return 'application/octet-stream'
|
||||
@@ -30,7 +30,7 @@ function getContentType(file) {
|
||||
return 'application/octet-stream'
|
||||
}
|
||||
|
||||
function getCurrentTag() {
|
||||
const getCurrentTag = () => {
|
||||
try {
|
||||
const tag = execSync('git describe --tags --exact-match 2>/dev/null', {
|
||||
encoding: 'utf8',
|
||||
@@ -42,7 +42,7 @@ function getCurrentTag() {
|
||||
}
|
||||
}
|
||||
|
||||
function isGitTagDirty() {
|
||||
const isGitTagDirty = () => {
|
||||
try {
|
||||
const status = execSync('git status --porcelain', {
|
||||
encoding: 'utf8',
|
||||
@@ -54,7 +54,7 @@ function isGitTagDirty() {
|
||||
}
|
||||
}
|
||||
|
||||
async function uploadFile(filePath, platform, version) {
|
||||
const uploadFile = async (filePath, platform, version) => {
|
||||
const fileStream = fs.createReadStream(filePath)
|
||||
const fileName = path.basename(filePath)
|
||||
const key = `${platform}/${version}/${fileName}`
|
||||
@@ -71,7 +71,7 @@ async function uploadFile(filePath, platform, version) {
|
||||
)
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const main = async () => {
|
||||
const platform = process.argv[2]
|
||||
const version = process.argv[3]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user