1
0
mirror of https://github.com/nerzhul/ocsms.git synced 2025-07-21 17:05:43 +00:00

Add tools to package IHM properly

This commit is contained in:
Loic Blot 2018-11-11 14:21:10 +01:00
parent 95749f6d20
commit f090079eed
No known key found for this signature in database
GPG Key ID: EFAA458E8C153987
4 changed files with 35 additions and 1 deletions

View File

@ -13,7 +13,8 @@ RELEASE_VERSION=${1}
echo "Release version set to ${RELEASE_VERSION}" echo "Release version set to ${RELEASE_VERSION}"
sed -ri 's/(.*)<version>(.+)<\/version>/\1<version>'${RELEASE_VERSION}'<\/version>/g' ${SRC_DIR}/appinfo/info.xml sed -ri 's/(.*)<version>(.+)<\/version>/\1<version>'${RELEASE_VERSION}'<\/version>/g' ${SRC_DIR}/appinfo/info.xml
uglifyjs js/devel/*.js > js/app.min.js npm install
gulp uglify
git commit -am "Release "${RELEASE_VERSION} git commit -am "Release "${RELEASE_VERSION}
git tag ${RELEASE_VERSION} git tag ${RELEASE_VERSION}
git push git push
@ -22,8 +23,19 @@ git push --tags
sleep 1 sleep 1
cd /tmp cd /tmp
rm -Rf ocsms-packaging && mkdir ocsms-packaging && cd ocsms-packaging rm -Rf ocsms-packaging && mkdir ocsms-packaging && cd ocsms-packaging
# Download the git file from github
wget https://github.com/nextcloud/ocsms/archive/${RELEASE_VERSION}.tar.gz wget https://github.com/nextcloud/ocsms/archive/${RELEASE_VERSION}.tar.gz
tar xzf ${RELEASE_VERSION}.tar.gz tar xzf ${RELEASE_VERSION}.tar.gz
mv ocsms-${RELEASE_VERSION} ocsms mv ocsms-${RELEASE_VERSION} ocsms
# Drop unneeded files
rm -Rf \
ocsms/js/devel \
ocsms/gulpfile.js \
ocsms/package.json \
ocsms/.ci \
ocsms/.tx
tar cfz ocsms-${RELEASE_VERSION}.tar.gz ocsms tar cfz ocsms-${RELEASE_VERSION}.tar.gz ocsms
echo "Release version "${RELEASE_VERSION}" is now ready." echo "Release version "${RELEASE_VERSION}" is now ready."

2
.gitignore vendored
View File

@ -1 +1,3 @@
.idea/* .idea/*
package-lock.json
node_modules/*

10
gulpfile.js Normal file
View File

@ -0,0 +1,10 @@
let gulp = require("gulp");
let rename = require("gulp-rename");
let uglify = require('gulp-uglify-es').default;
gulp.task("uglify", function () {
return gulp.src("js/devel/*.js")
.pipe(rename("app.min.js"))
.pipe(uglify(/* options */))
.pipe(gulp.dest("js/"));
});

10
package.json Normal file
View File

@ -0,0 +1,10 @@
{
"devDependencies": {
"gulp": "^3.9.1",
"gulp-concat": "latest",
"gulp-uglify": "^3.0.1",
"gulp-uglify-es": "^1.0.4",
"gulp-rename": "latest"
},
"dependencies": {}
}