mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-12-22 11:41:53 +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
|
||||
image: alpine
|
||||
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
|
||||
image: plugins/docker
|
||||
|
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -99,6 +99,10 @@ jobs:
|
||||
- name: Checkout repository
|
||||
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
|
||||
uses: docker/login-action@v2.0.0
|
||||
with:
|
||||
|
@ -6,7 +6,8 @@ return [
|
||||
'administrator' => 'root',
|
||||
'admin-email' => 'admin@sjzezoj.com',
|
||||
'QQ-group' => '',
|
||||
'ICP-license' => '冀ICP备2020028886号'
|
||||
'ICP-license' => '冀ICP备2020028886号',
|
||||
's2oj-version' => 'dev'
|
||||
],
|
||||
'database' => [
|
||||
'database' => 'app_uoj233',
|
||||
|
@ -15,12 +15,14 @@
|
||||
<a class="dropdown-item" href="<?= HTML::url(UOJContext::requestURI(), array('params' => array('locale' => 'en'))) ?>">English</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="list-inline"><li class="list-inline-item">Universal Online Judge</li></ul>
|
||||
<?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>
|
||||
<?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><?= 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'] != ''): ?>
|
||||
| <a target="_blank" href="https://beian.miit.gov.cn" style="text-decoration:none;"><?= UOJConfig::$data['profile']['ICP-license'] ?></a>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user