add templating of app URL
This commit is contained in:
parent
590bdccd86
commit
b47df0f103
|
@ -16,8 +16,15 @@ import gutil from 'gulp-util'
|
|||
import rename from 'gulp-rename'
|
||||
import uglify from 'gulp-uglify'
|
||||
import htmlmin from 'gulp-htmlmin'
|
||||
import template from 'gulp-template'
|
||||
import imagemin from 'gulp-imagemin'
|
||||
|
||||
/* HTML template parameters */
|
||||
const apk_url = (
|
||||
process.env.NODE_ENV ||
|
||||
'http://artifacts.status.im:8081/artifactory/nightlies-local/im.status.ethereum-14a369-rel.apk'
|
||||
)
|
||||
|
||||
gulp.task('js', () => {
|
||||
return gulp.src('src/js/**/*.js', {read: false})
|
||||
.pipe(sourcemaps.init({loadMaps: true}))
|
||||
|
@ -40,6 +47,7 @@ gulp.task('fonts', () => {
|
|||
gulp.task('html', () => {
|
||||
return gulp.src(['src/**/*.html'])
|
||||
.pipe(htmlmin({collapseWhitespace: true, minifyJS: true}))
|
||||
.pipe(template({apk_url}))
|
||||
.pipe(rename(p => p.dirname = p.dirname.slice(5)))
|
||||
.pipe(gulp.dest('dist'))
|
||||
})
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<div class="tagline__body">Status是一个浏览器、通讯工具和通向去中心化世界的入口。</div>
|
||||
<div class="tagline__form">
|
||||
<div class="download-apk">
|
||||
<a href="http://artifacts.status.im:8081/artifactory/nightlies-local/im.status.ethereum-14a369-rel.apk" class="button email-form__input email-form__input--sumbit mc-embedded-subscribe button email-button">
|
||||
<a href="<%= apk_url %>" class="button email-form__input email-form__input--sumbit mc-embedded-subscribe button email-button">
|
||||
DOWNLOAD APK
|
||||
</a>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue