From 1cecd2c6e89941e1afbea734118d088762ea82f3 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Tue, 27 Sep 2022 13:34:03 +0000 Subject: [PATCH] contrib: rename some shell scripts to have ".sh" extension The extension gives formatting hints to some editors. (especially if they support .editorconfig) --- .cirrus.yml | 4 ++-- contrib/add_cosigner | 2 +- contrib/android/Readme.md | 6 +++--- contrib/android/build.sh | 2 +- contrib/android/{make_apk => make_apk.sh} | 2 +- contrib/build-linux/sdist/make_sdist.sh | 4 ++-- contrib/{make_packages => make_packages.sh} | 0 contrib/osx/README.md | 6 +++--- contrib/osx/{make_osx => make_osx.sh} | 0 contrib/release.sh | 4 ++-- contrib/{upload => upload.sh} | 0 11 files changed, 15 insertions(+), 15 deletions(-) rename contrib/android/{make_apk => make_apk.sh} (97%) rename contrib/{make_packages => make_packages.sh} (100%) rename contrib/osx/{make_osx => make_osx.sh} (100%) rename contrib/{upload => upload.sh} (100%) diff --git a/.cirrus.yml b/.cirrus.yml index 961844ef4..63fbdf27a 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -177,7 +177,7 @@ task: cpu: 2 memory: 2G build_script: - - ./contrib/android/make_apk kivy arm64-v8a debug + - ./contrib/android/make_apk.sh kivy arm64-v8a debug binaries_artifacts: path: "dist/*" @@ -190,7 +190,7 @@ task: install_script: - git fetch --all --tags build_script: - - ./contrib/osx/make_osx + - ./contrib/osx/make_osx.sh sum_script: - ls -lah dist - shasum -a 256 dist/*.dmg diff --git a/contrib/add_cosigner b/contrib/add_cosigner index d65261bf3..2e9b7d936 100755 --- a/contrib/add_cosigner +++ b/contrib/add_cosigner @@ -8,7 +8,7 @@ # - BUILDER creates a PR against https://github.com/spesmilo/electrum-signatures/ # to add their sigs for a given release, which then gets merged # - SFTPUSER runs `$ electrum/contrib/add_cosigner $BUILDER` -# - SFTPUSER runs `$ SSHUSER=$SFTPUSER electrum/contrib/upload` +# - SFTPUSER runs `$ SSHUSER=$SFTPUSER electrum/contrib/upload.sh` # - SFTPUSER runs `$ electrum/contrib/make_download $WWW_DIR` # - $ (cd $WWW_DIR; git commit -a -m "add_cosigner"; git push) # - SFTPUSER runs `$ electrum-web/publish.sh $SFTPUSER` diff --git a/contrib/android/Readme.md b/contrib/android/Readme.md index db7711edb..c9c63d907 100644 --- a/contrib/android/Readme.md +++ b/contrib/android/Readme.md @@ -33,14 +33,14 @@ similar system. ## Verifying reproducibility and comparing against official binary -Every user can verify that the official binary was created from the source code in this +Every user can verify that the official binary was created from the source code in this repository. 1. Build your own binary as described above. Make sure you don't build in `debug` mode, instead use either of `release` or `release-unsigned`. If you build in `release` mode, the apk will be signed, which requires a keystore - that you need to create manually (see source of `make_apk` for an example). + that you need to create manually (see source of `make_apk.sh` for an example). 2. Note that the binaries are not going to be byte-for-byte identical, as the official release is signed by a keystore that only the project maintainers have. You can use the `apkdiff.py` python script (written by the Signal developers) to compare @@ -102,7 +102,7 @@ If you just follow the instructions above, you will build the apk in debug mode. The most notable difference is that the apk will be signed using a debug keystore. If you are planning to upload what you build to e.g. the Play Store, you should create your own -keystore, back it up safely, and run `./contrib/make_apk release`. +keystore, back it up safely, and run `./contrib/make_apk.sh release`. See e.g. [kivy wiki](https://github.com/kivy/kivy/wiki/Creating-a-Release-APK) and [android dev docs](https://developer.android.com/studio/build/building-cmdline#sign_cmdline). diff --git a/contrib/android/build.sh b/contrib/android/build.sh index ed5edc539..eed613c20 100755 --- a/contrib/android/build.sh +++ b/contrib/android/build.sh @@ -74,7 +74,7 @@ docker run -it --rm \ $DOCKER_RUN_FLAGS \ --workdir /home/user/wspace/electrum \ electrum-android-builder-img \ - ./contrib/android/make_apk "$@" + ./contrib/android/make_apk.sh "$@" # make sure resulting binary location is independent of fresh_clone if [ ! -z "$ELECBUILD_COMMIT" ] ; then diff --git a/contrib/android/make_apk b/contrib/android/make_apk.sh similarity index 97% rename from contrib/android/make_apk rename to contrib/android/make_apk.sh index 6f315ddfb..05c93729b 100755 --- a/contrib/android/make_apk +++ b/contrib/android/make_apk.sh @@ -15,7 +15,7 @@ LOCALE="$PROJECT_ROOT"/electrum/locale/ export ELEC_APK_GUI=$1 if [ ! -d "$PACKAGES" ]; then - "$CONTRIB"/make_packages || fail "make_packages failed" + "$CONTRIB"/make_packages.sh || fail "make_packages failed" fi pushd "$PROJECT_ROOT" diff --git a/contrib/build-linux/sdist/make_sdist.sh b/contrib/build-linux/sdist/make_sdist.sh index ca004fcac..cae834575 100755 --- a/contrib/build-linux/sdist/make_sdist.sh +++ b/contrib/build-linux/sdist/make_sdist.sh @@ -16,12 +16,12 @@ python3 --version || fail "python interpreter not found" break_legacy_easy_install # upgrade to modern pip so that it knows the flags we need. -# (make_packages will later install a pinned version of pip in a venv) +# (make_packages.sh will later install a pinned version of pip in a venv) python3 -m pip install --upgrade pip rm -rf "$PROJECT_ROOT/packages/" if ([ "$OMIT_UNCLEAN_FILES" != 1 ]); then - "$CONTRIB"/make_packages || fail "make_packages failed" + "$CONTRIB"/make_packages.sh || fail "make_packages failed" fi git submodule update --init diff --git a/contrib/make_packages b/contrib/make_packages.sh similarity index 100% rename from contrib/make_packages rename to contrib/make_packages.sh diff --git a/contrib/osx/README.md b/contrib/osx/README.md index 6737708d7..2f5dd1b19 100644 --- a/contrib/osx/README.md +++ b/contrib/osx/README.md @@ -103,17 +103,17 @@ $ hdiutil detach "/Volumes/Command Line Developer Tools" #### 2. Build Electrum cd electrum - ./contrib/osx/make_osx + ./contrib/osx/make_osx.sh This creates both a folder named Electrum.app and the .dmg file. If you want the binaries codesigned for MacOS and notarised by Apple's central server, -provide these env vars to the `make_osx` script: +provide these env vars to the `make_osx.sh` script: CODESIGN_CERT="Developer ID Application: Electrum Technologies GmbH (L6P37P7P56)" \ APPLE_ID_USER="me@email.com" \ APPLE_ID_PASSWORD="1234" \ - ./contrib/osx/make_osx + ./contrib/osx/make_osx.sh ## Verifying reproducibility and comparing against official binary diff --git a/contrib/osx/make_osx b/contrib/osx/make_osx.sh similarity index 100% rename from contrib/osx/make_osx rename to contrib/osx/make_osx.sh diff --git a/contrib/release.sh b/contrib/release.sh index 64a8c23c0..57cd0fc61 100755 --- a/contrib/release.sh +++ b/contrib/release.sh @@ -240,7 +240,7 @@ if [ -z "$RELEASEMANAGER" ] ; then gpg --sign --armor --detach $PUBKEY --output "$PROJECT_ROOT/dist/sigs/$signame" "$fname" done # upload sigs - ELECBUILD_UPLOADFROM="$PROJECT_ROOT/dist/sigs/" "$CONTRIB/upload" + ELECBUILD_UPLOADFROM="$PROJECT_ROOT/dist/sigs/" "$CONTRIB/upload.sh" else # ONLY release manager @@ -262,7 +262,7 @@ else if test -f dist/uploaded; then info "files already uploaded" else - ./contrib/upload + ./contrib/upload.sh touch dist/uploaded fi diff --git a/contrib/upload b/contrib/upload.sh similarity index 100% rename from contrib/upload rename to contrib/upload.sh