forked from cryptoadvance/specter-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kim Neunert
committed
May 28, 2024
1 parent
515b788
commit b09f315
Showing
2 changed files
with
26 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -263,8 +263,8 @@ update_github: | |
# write access to [email protected]:swan-bitcoin/specter-static.git | ||
- source ./utils/prepare_for_git_write.sh "$SSH_SPECTERSTATIC_DEPLOY_KEY" | ||
script: | ||
- echo "Now updating https://github.com:${CI_PROJECT_ROOT_NAMESPACE}/specterext-dummy.git" | ||
- ./utils/generate_downloadpage.sh --org_name ${CI_PROJECT_ROOT_NAMESPACE:-k9ert} --debug --version ${CI_COMMIT_TAG:-v0.0.0-pre3} generate github # default-value for testing | ||
- echo "Now updating https://github.com:${CI_PROJECT_ROOT_NAMESPACE}/specter-desktop/releases/tag/${CI_COMMIT_TAG:-v2.0.4-pre8}" | ||
- ./utils/generate_downloadpage.sh --org_name ${CI_PROJECT_ROOT_NAMESPACE:-k9ert} --debug --version ${CI_COMMIT_TAG:-v2.0.4-pre8} generate github # default-value for testing | ||
|
||
# update github | ||
update_webpage: | ||
|
@@ -275,6 +275,6 @@ update_webpage: | |
# write access to [email protected]:swan-bitcoin/specter-static.git | ||
- source ./utils/prepare_for_git_write.sh "$SSH_SPECTERSTATIC_DEPLOY_KEY" | ||
script: | ||
- echo "Now updating https://github.com:${CI_PROJECT_ROOT_NAMESPACE}/specterext-dummy.git" | ||
- ./utils/generate_downloadpage.sh --org_name ${CI_PROJECT_ROOT_NAMESPACE:-k9ert} --debug --version ${CI_COMMIT_TAG:-v0.0.0-pre3} generate webpage # default-value for testing | ||
- echo "Now updating https://github.com:${CI_PROJECT_ROOT_NAMESPACE}/specter-static.git" | ||
- ./utils/generate_downloadpage.sh --org_name ${CI_PROJECT_ROOT_NAMESPACE:-k9ert} --debug --version ${CI_COMMIT_TAG:-v2.0.4-pre8} generate webpage # default-value for testing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,6 +88,13 @@ function generate { | |
} | ||
|
||
function update_github { | ||
# Determine the platform and execute the appropriate function | ||
platform="$(uname -s)" | ||
case "${platform}" in | ||
Linux*) install_gh_linux;; | ||
Darwin*) install_gh_macos;; | ||
*) echo "Unsupported platform: ${platform}"; exit 1;; | ||
esac | ||
if ! command -v gh &> /dev/null; then | ||
echo "WARNING: 'gh' binary not found or not executable. Please ensure it is installed and in your PATH." | ||
echo "You need now to manually replace the release-Notes. I'll list them here:" | ||
|
@@ -101,13 +108,20 @@ function update_github { | |
} | ||
|
||
function update_webpage { | ||
if [[ $version =~ -pre[0-9]+$ ]]; then | ||
if [[ "$org_name" = "swan-bitcoin" ]]; then | ||
echo "The version has a pre-release suffix. Exiting..." | ||
return 0 | ||
fi | ||
echo "we have a pre-release but continuing for testing purposes anyway" | ||
fi | ||
if ! [[ -d ../../specter-static ]]; then | ||
echo "You don't have cloned the specter-static repo." | ||
echo "doing that now" | ||
git clone [email protected]:swan-bitcoin/specter-static.git | ||
specter_static_folder=./specter-static | ||
echo "You don't have cloned the specter-static repo." | ||
echo "doing that now" | ||
git clone [email protected]:swan-bitcoin/specter-static.git | ||
specter_static_folder=./specter-static | ||
else | ||
specter_static_folder=../../specter-static | ||
specter_static_folder=../../specter-static | ||
fi | ||
target_file=${specter_static_folder}/specter-httrack-src/specter.solutions/downloads/index.html | ||
|
||
|
@@ -118,8 +132,8 @@ function update_webpage { | |
|
||
# Check if working directory is clean | ||
if git diff --quiet && git diff --staged --quiet; then | ||
echo "Git working directory is clean. Exiting..." | ||
exit 0 | ||
echo "Git working directory is clean. Exiting..." | ||
exit 0 | ||
fi | ||
|
||
# Add the file to the staging area | ||
|
@@ -131,7 +145,7 @@ function update_webpage { | |
# Push the commit | ||
#read -p "Push commit to remote? (y/n): " confirm | ||
#if [[ $confirm =~ ^[Yy]$ ]]; then | ||
#git push | ||
git push | ||
#else | ||
# echo "Push aborted." | ||
# exit 1 | ||
|