Add placeholder commit_sha

This commit is contained in:
Reckless_Satoshi 2023-05-19 04:44:44 -07:00
parent 7b91355109
commit f5f78588c3
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
4 changed files with 7 additions and 10 deletions

View File

@ -71,7 +71,8 @@ jobs:
- name: 'Save Commit Long Hash to TXT File'
run: |
echo ${{ steps.commit.outputs.long }}>"commit_sha.txt"
rm commit_sha
echo ${{ steps.commit.outputs.long }}>"commit_sha"
- name: 'Build and push Docker image'
uses: docker/build-push-action@v4

1
.gitignore vendored
View File

@ -646,7 +646,6 @@ frontend/src/components/PaymentMethods/Icons/webp*
frontend/static/frontend/**
docs/.jekyll-cache*
docs/_site*
commit_sha.txt
node
# mobile frontend js

View File

@ -155,16 +155,12 @@ def get_lnd_version():
robosats_commit_cache = {}
@ring.dict(robosats_commit_cache, expire=3600)
@ring.dict(robosats_commit_cache, expire=99999)
def get_robosats_commit():
commit = os.popen('git log -n 1 --pretty=format:"%H"')
commit_hash = commit.read()
# .git folder is included in .dockerignore. But automatic build will drop in a commit_sha.txt file on root
if commit_hash is None or commit_hash == "":
with open("commit_sha.txt") as f:
commit_hash = f.read()
# .git folder is included in .dockerignore. The build workflow will drop the commit_sha file in root
with open("commit_sha") as f:
commit_hash = f.read()
return commit_hash

1
commit_sha Normal file
View File

@ -0,0 +1 @@
00000000000000000000 dev