mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 10:18:41 +00:00
feat: display s2oj version
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
dac1c4bf51
commit
d8bbc6f41c
@ -57,7 +57,12 @@ steps:
|
|||||||
- name: tags
|
- name: tags
|
||||||
image: alpine
|
image: alpine
|
||||||
commands:
|
commands:
|
||||||
- echo -n "latest, $DRONE_BRANCH, ${DRONE_COMMIT_SHA:0:8}" > .tags
|
- echo -n "latest, $DRONE_BRANCH, ${DRONE_COMMIT_SHA:0:7}" > .tags
|
||||||
|
|
||||||
|
- name: version
|
||||||
|
image: alpine
|
||||||
|
commands:
|
||||||
|
- sed -i "s/'s2oj-version' => 'dev'/'s2oj-version' => '${DRONE_COMMIT_SHA:0:7}'/g" web/app/.default-config.php
|
||||||
|
|
||||||
- name: docker
|
- name: docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
|
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -99,6 +99,10 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Replace version
|
||||||
|
run: |
|
||||||
|
sed -i "s/'s2oj-version' => 'dev'/'s2oj-version' => '$(echo "${{ github.sha }}" | cut -c1-7)'/g" web/app/.default-config.php
|
||||||
|
|
||||||
- name: Log in to the Container registry
|
- name: Log in to the Container registry
|
||||||
uses: docker/login-action@v2.0.0
|
uses: docker/login-action@v2.0.0
|
||||||
with:
|
with:
|
||||||
|
@ -6,7 +6,8 @@ return [
|
|||||||
'administrator' => 'root',
|
'administrator' => 'root',
|
||||||
'admin-email' => 'admin@sjzezoj.com',
|
'admin-email' => 'admin@sjzezoj.com',
|
||||||
'QQ-group' => '',
|
'QQ-group' => '',
|
||||||
'ICP-license' => '冀ICP备2020028886号'
|
'ICP-license' => '冀ICP备2020028886号',
|
||||||
|
's2oj-version' => 'dev'
|
||||||
],
|
],
|
||||||
'database' => [
|
'database' => [
|
||||||
'database' => 'app_uoj233',
|
'database' => 'app_uoj233',
|
||||||
|
@ -16,11 +16,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="list-inline"><li class="list-inline-item">Universal Online Judge</li></ul>
|
<p><?= UOJLocale::get('server time') ?>: <?= UOJTime::$time_now_str ?></p>
|
||||||
|
<p>
|
||||||
|
<a href="https://github.com/renbaoshuo/S2OJ<?= UOJConfig::$data['profile']['s2oj-version'] == "dev" ? '' : '/tree/' . UOJConfig::$data['profile']['s2oj-version'] ?>">S2OJ (<?= UOJConfig::$data['profile']['s2oj-version'] ?>)</a>
|
||||||
<?php if (UOJConfig::$data['profile']['ICP-license'] != ''): ?>
|
<?php if (UOJConfig::$data['profile']['ICP-license'] != ''): ?>
|
||||||
<p><a target="_blank" href="https://beian.miit.gov.cn" style="text-decoration:none;"><?= UOJConfig::$data['profile']['ICP-license'] ?></a></p>
|
| <a target="_blank" href="https://beian.miit.gov.cn" style="text-decoration:none;"><?= UOJConfig::$data['profile']['ICP-license'] ?></a>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<p><?= UOJLocale::get('server time') ?>: <?= UOJTime::$time_now_str ?> | <a href="https://github.com/renbaoshuo/S2OJ" target="_blank"><?= UOJLocale::get('opensource project') ?></a></p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user