Skip to content

Commit

Permalink
[MINOR] Improved release scripts
Browse files Browse the repository at this point in the history
* Removed test binaries, conf dir
* added check if version param is there
* fixed documentation
* Added CITATION and KEYS
  • Loading branch information
corepointer committed Oct 21, 2022
1 parent 46a7ee5 commit aa6ef4a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions doc/ReleaseScripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ that the one key owner trusts the other.
4) **Signing and checksumming:**
* ``` bash
cd artifacts
~/path/to/daphne/release.sh --artifact ./daphne-0.1-bin.tgz --gpgkey <GPG_KEY_ID> --githash `cat daphne-0.1-bin.githash`
~/path/to/daphne/release.sh --version 0.1 --artifact ./daphne-0.1-bin.tgz --gpgkey <GPG_KEY_ID> --githash `cat daphne-0.1-bin.githash`
```
* repeat for other feature artifacts
5) **Tag & push** The previous signing command will provide you with two more git commands to tag the commit that the artfiacts were made from and to push these tags to github.
This should look something like this:
``` bash
git tag -a -u B28F8F4D -1 312b2b50b4e60b3c5157c3365ec38383d35e28d8
git tag -a -u B28F8F4D 0.1 312b2b50b4e60b3c5157c3365ec38383d35e28d8
git push git@github.com:corepointer/daphne.git --tags
```
6) **Upload & release**:
Expand Down
11 changes: 5 additions & 6 deletions pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ case "$FEATURE" in
esac

export PACK_ROOT=daphne$FEATURE-$DAPHNE_VERSION-bin
#echo "You have 10 seconds to abort (press Ctrl-c)"
#sleep 10

echo "Directories bin, build and lib will be removed before compiling."
read -p "Are you sure? [y/n] " -n 1 -r
echo ""
Expand Down Expand Up @@ -127,11 +126,11 @@ source test.sh $FEATURE
# shellcheck disable=SC2181
if [[ $? == 0 ]];then
cd "$daphneBuildDir"
mkdir -p "$PACK_ROOT/conf"
mkdir -p "$PACK_ROOT/bin"
# shellcheck disable=SC2154
cp -a "$projectRoot"/{bin,deploy,doc,lib,scripts} "$PACK_ROOT"
cp "$projectRoot"/UserConfig.json "$PACK_ROOT"
cp "$projectRoot"/{CONTRIBUTING.md,LICENSE.txt,README.md} "$PACK_ROOT"
cp -a "$projectRoot"/{deploy,doc,lib,scripts} "$PACK_ROOT"
cp -a "$projectRoot"/bin/{daphne,DistributedWorker} "$PACK_ROOT/bin"
cp "$projectRoot"/{CITATION,CONTRIBUTING.md,KEYS.txt,LICENSE.txt,README.md,UserConfig.json} "$PACK_ROOT"
tar czf "$PACK_ROOT".tgz "$PACK_ROOT"
cd - > /dev/null
else
Expand Down
11 changes: 5 additions & 6 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,13 @@ if [ -n "$unknown_options" ]; then
exit_with_usage
fi

if [ $BUILD -eq 1 ]; then
if [[ "$DAPHNE_VERSION" == "-1" ]] || [[ $GIT_HASH == "0" ]]; then
echo Error: version or hash not supplied
exit_with_usage
fi
if [[ "$DAPHNE_VERSION" == "-1" ]] || [[ $GIT_HASH == "0" ]]; then
echo Error: version and git hash have to be specified
exit_with_usage
fi

if [ $BUILD -eq 1 ]; then
if [[ "$FEATURE" == "--feature " ]]; then
# echo "Clearing FEATURE= variable"
FEATURE=
fi

Expand Down

0 comments on commit aa6ef4a

Please sign in to comment.