Browse Source

contrib: rename some shell scripts to have ".sh" extension

The extension gives formatting hints to some editors. (especially if they support .editorconfig)
patch-4
SomberNight 2 years ago
parent
commit
1cecd2c6e8
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 4
      .cirrus.yml
  2. 2
      contrib/add_cosigner
  3. 6
      contrib/android/Readme.md
  4. 2
      contrib/android/build.sh
  5. 2
      contrib/android/make_apk.sh
  6. 4
      contrib/build-linux/sdist/make_sdist.sh
  7. 0
      contrib/make_packages.sh
  8. 6
      contrib/osx/README.md
  9. 0
      contrib/osx/make_osx.sh
  10. 4
      contrib/release.sh
  11. 0
      contrib/upload.sh

4
.cirrus.yml

@ -177,7 +177,7 @@ task:
cpu: 2 cpu: 2
memory: 2G memory: 2G
build_script: build_script:
- ./contrib/android/make_apk kivy arm64-v8a debug - ./contrib/android/make_apk.sh kivy arm64-v8a debug
binaries_artifacts: binaries_artifacts:
path: "dist/*" path: "dist/*"
@ -190,7 +190,7 @@ task:
install_script: install_script:
- git fetch --all --tags - git fetch --all --tags
build_script: build_script:
- ./contrib/osx/make_osx - ./contrib/osx/make_osx.sh
sum_script: sum_script:
- ls -lah dist - ls -lah dist
- shasum -a 256 dist/*.dmg - shasum -a 256 dist/*.dmg

2
contrib/add_cosigner

@ -8,7 +8,7 @@
# - BUILDER creates a PR against https://github.com/spesmilo/electrum-signatures/ # - BUILDER creates a PR against https://github.com/spesmilo/electrum-signatures/
# to add their sigs for a given release, which then gets merged # to add their sigs for a given release, which then gets merged
# - SFTPUSER runs `$ electrum/contrib/add_cosigner $BUILDER` # - 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` # - SFTPUSER runs `$ electrum/contrib/make_download $WWW_DIR`
# - $ (cd $WWW_DIR; git commit -a -m "add_cosigner"; git push) # - $ (cd $WWW_DIR; git commit -a -m "add_cosigner"; git push)
# - SFTPUSER runs `$ electrum-web/publish.sh $SFTPUSER` # - SFTPUSER runs `$ electrum-web/publish.sh $SFTPUSER`

6
contrib/android/Readme.md

@ -33,14 +33,14 @@ similar system.
## Verifying reproducibility and comparing against official binary ## 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. repository.
1. Build your own binary as described above. 1. Build your own binary as described above.
Make sure you don't build in `debug` mode, Make sure you don't build in `debug` mode,
instead use either of `release` or `release-unsigned`. instead use either of `release` or `release-unsigned`.
If you build in `release` mode, the apk will be signed, which requires a keystore 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 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. 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 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 in debug mode. The most notable difference is that the apk will be
signed using a debug keystore. If you are planning to upload 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 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) 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). and [android dev docs](https://developer.android.com/studio/build/building-cmdline#sign_cmdline).

2
contrib/android/build.sh

@ -74,7 +74,7 @@ docker run -it --rm \
$DOCKER_RUN_FLAGS \ $DOCKER_RUN_FLAGS \
--workdir /home/user/wspace/electrum \ --workdir /home/user/wspace/electrum \
electrum-android-builder-img \ electrum-android-builder-img \
./contrib/android/make_apk "$@" ./contrib/android/make_apk.sh "$@"
# make sure resulting binary location is independent of fresh_clone # make sure resulting binary location is independent of fresh_clone
if [ ! -z "$ELECBUILD_COMMIT" ] ; then if [ ! -z "$ELECBUILD_COMMIT" ] ; then

2
contrib/android/make_apk → contrib/android/make_apk.sh

@ -15,7 +15,7 @@ LOCALE="$PROJECT_ROOT"/electrum/locale/
export ELEC_APK_GUI=$1 export ELEC_APK_GUI=$1
if [ ! -d "$PACKAGES" ]; then if [ ! -d "$PACKAGES" ]; then
"$CONTRIB"/make_packages || fail "make_packages failed" "$CONTRIB"/make_packages.sh || fail "make_packages failed"
fi fi
pushd "$PROJECT_ROOT" pushd "$PROJECT_ROOT"

4
contrib/build-linux/sdist/make_sdist.sh

@ -16,12 +16,12 @@ python3 --version || fail "python interpreter not found"
break_legacy_easy_install break_legacy_easy_install
# upgrade to modern pip so that it knows the flags we need. # 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 python3 -m pip install --upgrade pip
rm -rf "$PROJECT_ROOT/packages/" rm -rf "$PROJECT_ROOT/packages/"
if ([ "$OMIT_UNCLEAN_FILES" != 1 ]); then if ([ "$OMIT_UNCLEAN_FILES" != 1 ]); then
"$CONTRIB"/make_packages || fail "make_packages failed" "$CONTRIB"/make_packages.sh || fail "make_packages failed"
fi fi
git submodule update --init git submodule update --init

0
contrib/make_packages → contrib/make_packages.sh

6
contrib/osx/README.md

@ -103,17 +103,17 @@ $ hdiutil detach "/Volumes/Command Line Developer Tools"
#### 2. Build Electrum #### 2. Build Electrum
cd electrum cd electrum
./contrib/osx/make_osx ./contrib/osx/make_osx.sh
This creates both a folder named Electrum.app and the .dmg file. 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, 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)" \ CODESIGN_CERT="Developer ID Application: Electrum Technologies GmbH (L6P37P7P56)" \
APPLE_ID_USER="me@email.com" \ APPLE_ID_USER="me@email.com" \
APPLE_ID_PASSWORD="1234" \ APPLE_ID_PASSWORD="1234" \
./contrib/osx/make_osx ./contrib/osx/make_osx.sh
## Verifying reproducibility and comparing against official binary ## Verifying reproducibility and comparing against official binary

0
contrib/osx/make_osx → contrib/osx/make_osx.sh

4
contrib/release.sh

@ -240,7 +240,7 @@ if [ -z "$RELEASEMANAGER" ] ; then
gpg --sign --armor --detach $PUBKEY --output "$PROJECT_ROOT/dist/sigs/$signame" "$fname" gpg --sign --armor --detach $PUBKEY --output "$PROJECT_ROOT/dist/sigs/$signame" "$fname"
done done
# upload sigs # upload sigs
ELECBUILD_UPLOADFROM="$PROJECT_ROOT/dist/sigs/" "$CONTRIB/upload" ELECBUILD_UPLOADFROM="$PROJECT_ROOT/dist/sigs/" "$CONTRIB/upload.sh"
else else
# ONLY release manager # ONLY release manager
@ -262,7 +262,7 @@ else
if test -f dist/uploaded; then if test -f dist/uploaded; then
info "files already uploaded" info "files already uploaded"
else else
./contrib/upload ./contrib/upload.sh
touch dist/uploaded touch dist/uploaded
fi fi

0
contrib/upload → contrib/upload.sh

Loading…
Cancel
Save