Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore(build, ci): modify the default buildpack and buildpack name #451

Merged
merged 1 commit into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/build_packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,24 @@ jobs:
asset_path: ./neuron-dashboard.zip
asset_name: neuron-dashboard.zip
asset_content_type: application/zip
- name: build-CN
- name: build-en
run: |
yarn
yarn build:CN
- name: create CN package
yarn build:en
- name: create en package
run: |
touch dist/version
echo "github_ref: $GITHUB_REF" >> dist/version
echo "github_sha: $GITHUB_SHA" >> dist/version
zip -rq neuron-dashboard-CN.zip ./dist
- name: Upload CN Release Asset
zip -rq neuron-dashboard-en.zip ./dist
- name: Upload en Release Asset
if: startsWith(github.ref, 'refs/tags/')
id: upload-CN-release-asset
id: upload-en-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./neuron-dashboard-CN.zip
asset_name: neuron-dashboard-CN.zip
asset_path: ./neuron-dashboard-en.zip
asset_name: neuron-dashboard-en.zip
asset_content_type: application/zip
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"dev:pc": "export VUE_APP_HOST=http://localhost:7003 && yarn serve",
"dev:server": "export VUE_APP_HOST=ws://iot-platform.cloud:6170 && yarn serve",
"dev:test": "export VUE_APP_HOST=http://124.70.166.104:7000 && yarn serve",
"dev:CN": "export VUE_APP_HOST=http://124.70.166.104:7000 && export VUE_APP_MULTI_LANG=true && yarn serve",
"dev:en": "export VUE_APP_HOST=http://124.70.166.104:7000 && export VUE_APP_LANG_EN=true && yarn serve",
"build": "vue-cli-service build",
"build:CN": "VUE_APP_MULTI_LANG=true vue-cli-service build",
"build:en": "VUE_APP_LANG_EN=true vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</template>
</emqx-dropdown>

<emqx-dropdown v-if="multiLangMode" class="dropdown-item" @command="changeLanguage">
<emqx-dropdown v-if="!EN_LANG" class="dropdown-item" @command="changeLanguage">
<span class="el-dropdown-link">
{{ langLabel }}
<i class="el-icon-arrow-down el-icon--right"></i>
Expand Down Expand Up @@ -73,7 +73,7 @@ import { useRouter } from 'vue-router'
import { downloadLogs } from '@/api/admin'
import { useDownload } from '@/composables/useDownload'
import useLang, { setLang } from '@/composables/useLang'
import { multiLangMode } from '@/config/index'
import { EN_LANG } from '@/config/index'

const store = useStore()
const router = useRouter()
Expand Down
2 changes: 1 addition & 1 deletion src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,4 @@ export const UserLevels = [
},
]

export const multiLangMode = process.env.VUE_APP_MULTI_LANG === 'true'
export const EN_LANG = process.env.VUE_APP_LANG_EN === 'true'