mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 12:11:35 +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'
|
- name: 'Save Commit Long Hash to TXT File'
|
||||||
run: |
|
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'
|
- name: 'Build and push Docker image'
|
||||||
uses: docker/build-push-action@v4
|
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/**
|
frontend/static/frontend/**
|
||||||
docs/.jekyll-cache*
|
docs/.jekyll-cache*
|
||||||
docs/_site*
|
docs/_site*
|
||||||
commit_sha.txt
|
|
||||||
node
|
node
|
||||||
|
|
||||||
# mobile frontend js
|
# mobile frontend js
|
||||||
|
10
api/utils.py
10
api/utils.py
@ -155,15 +155,11 @@ def get_lnd_version():
|
|||||||
robosats_commit_cache = {}
|
robosats_commit_cache = {}
|
||||||
|
|
||||||
|
|
||||||
@ring.dict(robosats_commit_cache, expire=3600)
|
@ring.dict(robosats_commit_cache, expire=99999)
|
||||||
def get_robosats_commit():
|
def get_robosats_commit():
|
||||||
|
|
||||||
commit = os.popen('git log -n 1 --pretty=format:"%H"')
|
# .git folder is included in .dockerignore. The build workflow will drop the commit_sha file in root
|
||||||
commit_hash = commit.read()
|
with open("commit_sha") as f:
|
||||||
|
|
||||||
# .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()
|
commit_hash = f.read()
|
||||||
|
|
||||||
return commit_hash
|
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