Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjj1024 committed Feb 5, 2025
1 parent 49e8f34 commit 758d013
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pakeplus",
"private": true,
"version": "0.4.4",
"version": "0.4.5",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
6 changes: 4 additions & 2 deletions src/pages/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ const forkProgect = async (tips: boolean = true) => {
break
}
}
// delete build.yml
deleteBuildYml()
testLoading.value = false
if (!tips) {
Expand Down Expand Up @@ -348,6 +349,7 @@ const creatLoading = ref(false)
// creat project branch
const creatBranch = async (first: boolean = false) => {
creatLoading.value = true
// update build.yml file content
token.value && (await uploadBuildYml())
// checkout branch name is english
if (branchName.value && /^[A-Za-z0-9]+$/.test(branchName.value)) {
Expand Down Expand Up @@ -431,14 +433,14 @@ const uploadBuildYml = async (_: string = 'main') => {
}
)
if (updateRes.status === 200 || updateRes.status === 201) {
console.log('updateRes', updateRes)
console.log('uploadBuildYml Res', updateRes)
} else {
console.log('uploadBuildYml error, but not important', updateRes)
}
}
// delete build yml file, must do, because main branch need action promise
const deleteBuildYml = async (branchName: string = 'main') => {
const deleteBuildYml = async (branchName: string = 'master') => {
const shaRes = await getFileSha('.github/workflows/build.yml', branchName)
console.log('get build.yml file sha', shaRes)
if (shaRes.status === 200) {
Expand Down

0 comments on commit 758d013

Please sign in to comment.