Skip to content

Commit

Permalink
Merge pull request #15 from eyra/14-npm-run-release
Browse files Browse the repository at this point in the history
Improved release script, see issue #14
  • Loading branch information
mellelieuwes authored Feb 16, 2024
2 parents e79e431 + c0dfa80 commit 3b1e318
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

release.zip


# dependencies
/node_modules
Expand All @@ -12,6 +12,7 @@ release.zip

# production
/build
/releases

# misc
.DS_Store
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "port",
"name": "feldspar",
"version": "0.1.0",
"private": true,
"homepage": ".",
Expand Down Expand Up @@ -31,8 +31,7 @@
"start:app": "react-scripts start",
"start": "concurrently 'npm run start:py' 'npm run start:app'",
"build": "npm run build:py && npm run build:app && npm run build:css",
"archive": "cd build && zip -r ../release.zip .",
"release": "npm run build && npm run archive",
"release": "npm run build && ./release.sh $npm_package_name",
"test": "react-scripts test",
"lint": "npm run fix:ts"
},
Expand Down
8 changes: 8 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
NAME=$1
mkdir -p releases
NR=$(find ./releases -type f | wc -l | xargs)
NR=$(($NR + 1))
TIMESTAMP=$(date '+%Y-%m-%d')
cd build
zip -r ../releases/${NAME}_${TIMESTAMP}_${NR}.zip .

0 comments on commit 3b1e318

Please sign in to comment.