Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Cesium
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
Cesium-grp
Cesium
Commits
a0bd0a82
Commit
a0bd0a82
authored
8 years ago
by
Benoit Lavenier
Browse files
Options
Downloads
Patches
Plain Diff
New script to upload assets to github
parent
09404467
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
github.sh
+10
-6
10 additions, 6 deletions
github.sh
release.sh
+6
-6
6 additions, 6 deletions
release.sh
www/js/config.js
+2
-2
2 additions, 2 deletions
www/js/config.js
with
18 additions
and
14 deletions
github.sh
+
10
−
6
View file @
a0bd0a82
...
...
@@ -48,14 +48,18 @@ case "$1" in
echo
"Creating new release..."
result
=
`
curl
-i
https://api.github.com/repos/duniter/cesium/releases
-u
$2
-d
'{"tag_name": "v'
"
$current
"
'","target_commitish": "master","name": "'
"
$current
"
'","body": "'
"
$3
"
'","draft": false,"prerelease": '
"
$prerelease
"
'}'
`
upload_url
=
`
echo
"
$result
"
|
grep
-P
"upload_url
\"
:
\"
[^
\"
]+"
|
grep
-oP
"https://[a-z0-9/.]+"
`
echo
$upload_url
upload_url
=
`
echo
"
$result
"
|
grep
-P
"
\"
upload_url
\"
:
\"
[^
\"
]+"
|
grep
-oP
"https://[a-z0-9/.]+"
`
### Sending files
echo
"Sending binaries..."
curl
-i
''
"
$upload_url
"
'?name=cesium-v'
"
$current
"
'-web.zip'
-u
$2
-H
'Content-Type: application/zip'
--data
'@platforms/web/build/cesium-web-'
"
$current
"
'.zip'
curl
-i
''
"
$upload_url
"
'?name=cesium-v'
"
$current
"
'-firefoxos.zip'
-u
$2
-H
'Content-Type: application/zip'
--data
'@platforms/firefoxos/build/package.zip'
curl
-i
''
"
$upload_url
"
'?name=cesium-v'
"
$current
"
'-android.apk'
-u
$2
-H
'Content-Type: application/vnd.android.package-archive'
--data
'@platforms/android/build/outputs/apk/android-release.apk'
echo
"Uploading files to GitHub..."
dirname
=
`
pwd
`
curl
-i
-u
$2
-H
'Content-Type: application/zip'
-T
$dirname
/platforms/web/build/cesium-web-
$current
.zip
$upload_url
?name
=
cesium-v
$current
-web
.zip
curl
-i
-u
$2
-H
'Content-Type: application/zip'
-T
$dirname
/platforms/firefoxos/build/package.zip
$upload_url
?name
=
cesium-v
$current
-firefoxos
.zip
curl
-i
-u
$2
-H
'Content-Type: application/vnd.android.package-archive'
-T
$dirname
/platforms/android/build/outputs/apk/android-release.apk
$upload_url
?name
=
cesium-v
$current
-android
.zip
echo
"Successfully uploading files"
release_url
=
`
echo
"
$result
"
|
grep
-P
"
\"
url
\"
:
\"
[^
\"
]+"
|
grep
-oP
"https://api.github.com/repos/[a-z0-9/.]+"
`
echo
" Release address:
$release_url
"
else
echo
"Wrong arguments"
echo
"Usage:"
...
...
This diff is collapsed.
Click to expand it.
release.sh
+
6
−
6
View file @
a0bd0a82
...
...
@@ -43,6 +43,12 @@ if [[ $2 =~ ^[0-9]+.[0-9]+.[0-9]+((a|b)[0-9]+)?$ && $3 =~ ^[0-9]+$ ]]; then
git commit
-m
"v
$2
"
git tag
"v
$2
"
git push
# Build assets
gulp default
--env
default
ionic build android
--release
ionic build firefoxos
--release
gulp build:web
--release
else
echo
"Wrong version format"
echo
"Usage:"
...
...
@@ -52,13 +58,7 @@ else
echo
" - android-version: nnn"
fi
gulp default
--env
default
ionic build android
--release
ionic build firefoxos
--release
gulp build:web
--release
...
...
This diff is collapsed.
Click to expand it.
www/js/config.js
+
2
−
2
View file @
a0bd0a82
...
...
@@ -28,8 +28,8 @@ angular.module("cesium.config", [])
"
port
"
:
"
9203
"
}
},
"
version
"
:
"
0.2.
4
"
,
"
build
"
:
"
2016-08-23T
09:43:41.411
Z
"
,
"
version
"
:
"
0.2.
5
"
,
"
build
"
:
"
2016-08-23T
11:23:56.892
Z
"
,
"
newIssueUrl
"
:
"
https://github.com/duniter/cesium/issues/new?labels=bug
"
})
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment