Skip to content

Commit

Permalink
make release script automatically fetch version number from CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
kartva committed Jan 8, 2024
1 parent 0535545 commit afd27ff
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,25 @@ RELEASE_PATH="release"

mkdir -p $RELEASE_PATH

# get the version number
VERSION=$(./run-cli.sh --version | awk '{print $NF}')
DIRNAME="librarian_v$VERSION"

# c creates an archive
# z tells it to use gzip
# f tells it the archive to save to
# s sends the filename to sed with the given commands
# -C changes directory, affects subsequent directory changes as well
tar --transform 's,^,librarian_v1.2/,' -czf $RELEASE_PATH/librarian.tar.gz -C server scripts -C ../target/x86_64-unknown-linux-musl/release librarian
tar --transform 's,^,librarian_v1.2/,' -czf $RELEASE_PATH/server.tar.gz -C server scripts -C ../target/x86_64-unknown-linux-musl/release server
tar --overwrite --transform "s,^,$DIRNAME/," -czf $RELEASE_PATH/librarian.tar.gz -C server scripts -C ../target/x86_64-unknown-linux-musl/release librarian
tar --overwrite --transform "s,^,$DIRNAME/," -czf $RELEASE_PATH/server.tar.gz -C server scripts -C ../target/x86_64-unknown-linux-musl/release server

cd frontend/example_inputs/
unzip -o example_inputs.zip
unzip -o example_inputs.zip # -o overwrites existing files
cd -

cd $RELEASE_PATH
tar -xf librarian.tar
./librarian_v1.2/librarian ../frontend/example_inputs/example_inputs/ATAC.example.fastq --local --raw --output-dir=.
./$DIRNAME/librarian ../frontend/example_inputs/example_inputs/ATAC.example.fastq --local --raw --output-dir=.

# check whether the files are non-empty
test -s librarian_heatmap.txt
Expand Down

0 comments on commit afd27ff

Please sign in to comment.