From aa6ef4a20254e12517c7a8acb5beee755d1726f3 Mon Sep 17 00:00:00 2001 From: Mark Dokter Date: Fri, 21 Oct 2022 20:41:13 +0200 Subject: [PATCH] [MINOR] Improved release scripts * Removed test binaries, conf dir * added check if version param is there * fixed documentation * Added CITATION and KEYS --- doc/ReleaseScripts.md | 4 ++-- pack.sh | 11 +++++------ release.sh | 11 +++++------ 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/doc/ReleaseScripts.md b/doc/ReleaseScripts.md index 8627089d1..901e4c8c6 100644 --- a/doc/ReleaseScripts.md +++ b/doc/ReleaseScripts.md @@ -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 --githash `cat daphne-0.1-bin.githash` + ~/path/to/daphne/release.sh --version 0.1 --artifact ./daphne-0.1-bin.tgz --gpgkey --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**: diff --git a/pack.sh b/pack.sh index 9582bb305..7b917e787 100755 --- a/pack.sh +++ b/pack.sh @@ -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 "" @@ -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 diff --git a/release.sh b/release.sh index ddf9a2843..6d148149d 100755 --- a/release.sh +++ b/release.sh @@ -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