Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard-package-script
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
mycard-package-script
Commits
adba4104
Commit
adba4104
authored
Aug 24, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first
parent
d0ff4a90
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
0 deletions
+55
-0
.gitignore
.gitignore
+1
-0
pack-all.sh
pack-all.sh
+9
-0
pack.sh
pack.sh
+10
-0
pool/.gitkeep
pool/.gitkeep
+0
-0
src/pack-utility.sh
src/pack-utility.sh
+35
-0
No files found.
.gitignore
0 → 100644
View file @
adba4104
/pool
pack-all.sh
0 → 100755
View file @
adba4104
#!/bin/bash
# set -o errexit
source
./src/pack-utility.sh
cd
pool
for
appName
in
*
;
do
runApp
"
$appName
"
"
$appName
"
done
cd
..
pack.sh
0 → 100755
View file @
adba4104
#!/bin/bash
# set -o errexit
source
./pack-utility.sh
appName
=
"
$1
"
appPath
=
"
$2
"
if
[[
-z
"
$appPath
"
]]
;
then
appPath
=
"pool/
$appName
"
fi
runApp
$appName
"
$appPath
"
pool/.gitkeep
0 → 100644
View file @
adba4104
src/pack-utility.sh
0 → 100755
View file @
adba4104
apiRoot
=
https://api.moecube.com
loginInfo
=
$(
curl
-sL
-X
POST
$apiRoot
/accounts/signin
-d
account
=
$username
-d
password
=
$password
)
token
=
$(
echo
$loginInfo
| jq
'.token'
|
sed
's/"//g'
)
header
=
"Authorization:
$token
"
echo
"Logged in."
if
[[
-z
"
$platform
"
]]
;
then
platform
=
"generic"
fi
if
[[
-z
"
$arch
"
]]
;
then
arch
=
"generic"
fi
if
[[
-z
"
$locale
"
]]
;
then
locale
=
"generic"
fi
suffix
=
"?platform=
$platform
&arch=
$arch
&locle=
$locale
"
runApp
()
{
appName
=
"
$1
"
appPath
=
"
$2
"
echo
"Packaging
$appName
"
if
[[
-z
"
$appVersion
"
]]
;
then
if
[[
-z
"
$appVersionPlatform
"
]]
;
then
appVersionPlatform
=
win32
fi
appVersion
=
$(
curl
-sL
-H
"
$header
"
"
$apiRoot
/release/api/app?id=
$appName
"
| jq
".data[0].appData.version.
$appVersionPlatform
"
|
sed
's/"//g'
)
fi
echo
"Version:
$appVersion
"
currentPath
=
"
$PWD
"
cd
"
$appPath
"
tar
--zstd
-cvf
-
*
| curl
-sL
-H
"
$header
"
-X
POST
"
$apiRoot
/release/api/build/
$appName
/
${
appVersion
}${
suffix
}
"
-F
file
=
@- | jq
echo
"Finished."
cd
"
$currentPath
"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment