mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 04:01:34 +00:00
Add placeholder commit_sha
This commit is contained in:
parent
7b91355109
commit
f5f78588c3
3
.github/workflows/coordinator-image.yml
vendored
3
.github/workflows/coordinator-image.yml
vendored
@ -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
1
.gitignore
vendored
@ -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
|
||||
|
10
api/utils.py
10
api/utils.py
@ -155,15 +155,11 @@ 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:
|
||||
# .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
1
commit_sha
Normal file
@ -0,0 +1 @@
|
||||
00000000000000000000 dev
|
Loading…
Reference in New Issue
Block a user