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:
parent
95749f6d20
commit
f090079eed
@ -13,7 +13,8 @@ RELEASE_VERSION=${1}
|
||||
echo "Release version set to ${RELEASE_VERSION}"
|
||||
|
||||
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 tag ${RELEASE_VERSION}
|
||||
git push
|
||||
@ -22,8 +23,19 @@ git push --tags
|
||||
sleep 1
|
||||
cd /tmp
|
||||
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
|
||||
tar xzf ${RELEASE_VERSION}.tar.gz
|
||||
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
|
||||
echo "Release version "${RELEASE_VERSION}" is now ready."
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1,3 @@
|
||||
.idea/*
|
||||
package-lock.json
|
||||
node_modules/*
|
10
gulpfile.js
Normal file
10
gulpfile.js
Normal 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
10
package.json
Normal 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": {}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user