Skip to content

Commit 6c86bfd

Browse files
committed
Add a release script
1 parent 352d1f0 commit 6c86bfd

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ target
33
*/dependency-reduced-pom.xml
44
.idea
55
**/*.iml
6+
Release/

release.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
#set -x
4+
5+
RELEASE_DIR=Release
6+
7+
cd $(dirname $0)
8+
9+
rm -rf $RELEASE_DIR
10+
11+
mvn clean package
12+
13+
DIR=$(mktemp -d)
14+
INST_DIR="${DIR}/nand2tetris/tools/bin"
15+
16+
git archive --format=tar HEAD nand2tetris | tar -x -C ${DIR}
17+
18+
cp HardwareSimulator/target/HardwareSimulator-*.jar $INST_DIR/HardwareSimulator.jar
19+
cp CPUEmulator/target/CPUEmulator-*.jar $INST_DIR/CPUEmulator.jar
20+
cp VMEmulator/target/VMEmulator-*.jar $INST_DIR/VMEmulator.jar
21+
22+
pushd $DIR
23+
zip -r nand2tetris.zip nand2tetris/
24+
popd
25+
mkdir $RELEASE_DIR
26+
mv $DIR/nand2tetris.zip $RELEASE_DIR
27+
rm -rf $DIR

0 commit comments

Comments
 (0)