Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

Commit

Permalink
Using env VERSION to build current version
Browse files Browse the repository at this point in the history
  • Loading branch information
Albert Backenhof authored and Albert Backenhof committed Mar 18, 2019
1 parent 5acc5eb commit 7066193
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
7 changes: 4 additions & 3 deletions gulpfile.js
Expand Up @@ -6,14 +6,15 @@ var webpackConfig = require('./webpack.config');
var webpack = require('webpack');
var pkg = require('./package.json');

var DIST = './dist'
var DIST = './dist';
var VERSION = process.env.VERSION || 'local-dev';

gulp.task('qext', function () {
var qext = {
name: 'Share button',
type: 'visualization',
description: pkg.description,
version: pkg.version,
version: VERSION,
icon: 'share',
preview: 'sharebutton.png',
keywords: 'qlik-sense, visualization',
Expand Down Expand Up @@ -55,7 +56,7 @@ gulp.task('clean', function(){

gulp.task('zip-build', function(){
return gulp.src(DIST + '/**/*')
.pipe(zip(`${pkg.name}_${pkg.version}.zip`))
.pipe(zip(`${pkg.name}_${VERSION}.zip`))
.pipe(gulp.dest(DIST));
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "qlik-share-button",
"version": "0.23.0",
"version": "0.0.1",
"description": "A button that creates links so that the current sheet and selections can be shared with others.",
"homepage": "",
"repository": "https://github.com/qlik-oss/Dashboard-Link-Generator",
Expand Down
5 changes: 1 addition & 4 deletions scripts/verify-files.sh
Expand Up @@ -10,14 +10,11 @@ while read line; do
if [[ $line =~ ^\"name\": ]]; then
name=${line#*: \"}
name=${name%\"*}
elif [[ $line =~ ^\"version\": ]]; then
version=${line#*: \"}
version=${version%\"*}
fi
done < package.json

expected_file_count=$(($(find dist -type f | wc -l)-1))
zip_file_count=$(zipinfo dist/${name}_${version}.zip | grep ^- | wc -l)
zip_file_count=$(zipinfo dist/${name}_${VERSION}.zip | grep ^- | wc -l)

if [ "${expected_file_count}" -ne "${zip_file_count}" ]; then
# File count is incorrect
Expand Down

0 comments on commit 7066193

Please sign in to comment.