From b339dc508886f991a3a95e598cd03f6d090daed9 Mon Sep 17 00:00:00 2001 From: Mikl Wolfe Date: Sun, 17 Mar 2024 14:57:25 -0600 Subject: [PATCH] feat(package): remove beta --- .github/workflows/build-beta.yml | 70 --------------------------- CONTRIBUTING.md | 7 +-- beta/CNAME | 1 - beta/README.md | 9 ---- beta/appspec.yml | 14 ------ beta/index.html | 77 ------------------------------ beta/workflows/beta-compile.yml | 41 ---------------- beta/workflows/beta-deploy.yml | 31 ------------ beta/workflows/beta-pr.yml | 62 ------------------------ beta/workflows/beta-prod.yml | 54 --------------------- client/constants.ts | 6 +-- client/src/components/Input.svelte | 9 ++-- 12 files changed, 8 insertions(+), 373 deletions(-) delete mode 100644 .github/workflows/build-beta.yml delete mode 100644 beta/CNAME delete mode 100644 beta/README.md delete mode 100644 beta/appspec.yml delete mode 100644 beta/index.html delete mode 100644 beta/workflows/beta-compile.yml delete mode 100644 beta/workflows/beta-deploy.yml delete mode 100644 beta/workflows/beta-pr.yml delete mode 100644 beta/workflows/beta-prod.yml diff --git a/.github/workflows/build-beta.yml b/.github/workflows/build-beta.yml deleted file mode 100644 index f8badd54..00000000 --- a/.github/workflows/build-beta.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Build Beta - -on: - pull_request: - types: - - labeled - - synchronize - - reopened - -jobs: - build: - if: contains(github.event.pull_request.labels.*.name, 'beta') - name: Build - runs-on: ubuntu-latest - permissions: - contents: write - env: - BRANCH: "${{ github.head_ref }}" - PR_NUMBER: "${{ github.event.pull_request.number }}" - PR_TITLE: "${{ github.event.pull_request.title }}" - - steps: - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 'latest' - - - name: Checkout - uses: actions/checkout@v4 - with: - token: ${{ secrets.DISPATCH_WORKFLOW }} - - - name: Date - id: date - run: | - echo "::set-output name=date::$(TZ=":US/Mountain" date +%m/%d/%y_%H:%M:%S)" - - - name: Beta Files - run : | - CURRENT_DATE=${{ steps.date.outputs.date }} - rm -rf docs/index.html docs/404.html docs/CNAME .github README.md - mkdir .github .github/workflows - mv beta/workflows/beta-prod.yml beta/workflows/beta-deploy.yml .github/workflows/ - mv beta/index.html beta/404.html beta/CNAME docs/ - mv beta/README.md . - echo -e "#### Pull Request:\n" >> README.md - echo -e "### [${PR_TITLE}](https://github.com/chiefmikey/gitlang/pull/${PR_NUMBER})\n" >> README.md - echo -e "#### Branch:\n" >> README.md - echo -e "### [${BRANCH}](https://github.com/chiefmikey/gitlang/tree/${BRANCH})\n" >> README.md - echo -e "#### Date:\n" >> README.md - echo -e "### ${CURRENT_DATE%%_*}\n" >> README.md - echo -e "#### Time (MT):\n" >> README.md - echo -e "### ${CURRENT_DATE##*_}\n" >> README.md - echo -e "\n" >> README.md - git config user.name "chiefmikey" - git config user.email "wolfemikl@gmail.com" - git add . - git commit -am "Beta README.md" - - - name: Push Main - run: | - CURRENT_DATE=${{ steps.date.outputs.date }} - git remote set-url --add --push origin https://github.com/chiefmikey/gitlang-beta.git - git reset $(git commit-tree HEAD^{tree} -m "PR: ${PR_TITLE} | Branch: ${BRANCH} | Date: ${CURRENT_DATE%%_*} | Time: ${CURRENT_DATE##*_}") - git push -fu origin HEAD:main - echo "PR: ${PR_TITLE}" - echo "Branch: ${BRANCH}" - echo "Date: ${CURRENT_DATE%%_*}" - echo "Time: ${CURRENT_DATE##*_}" - echo "https://beta.gitlang.net" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 31ae60cb..611321c4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -60,9 +60,4 @@ npm run start:server npm run start:client ``` -Client will be available in the browser on local port `8080`. - -## Beta - -If your PR is labeled with `beta`, it will be live for testing at -[beta.gitlang.net](https://beta.gitlang.net). +Client will be available in the browser on local port `8080` diff --git a/beta/CNAME b/beta/CNAME deleted file mode 100644 index 48bd5b3e..00000000 --- a/beta/CNAME +++ /dev/null @@ -1 +0,0 @@ -beta.gitlang.net diff --git a/beta/README.md b/beta/README.md deleted file mode 100644 index 014bc228..00000000 --- a/beta/README.md +++ /dev/null @@ -1,9 +0,0 @@ -
- - - GitLang logo - - -### [beta.gitlang.net](https://beta.gitlang.net) - -##### Current Deployment diff --git a/beta/appspec.yml b/beta/appspec.yml deleted file mode 100644 index c747a529..00000000 --- a/beta/appspec.yml +++ /dev/null @@ -1,14 +0,0 @@ -version: 0.0 -os: linux -files: - - source: ./server - destination: /home/ec2-user/server/gitlang-beta -hooks: - ApplicationStop: - - location: stop.sh - timeout: 300 - runas: root - ApplicationStart: - - location: init.sh - timeout: 300 - runas: root diff --git a/beta/index.html b/beta/index.html deleted file mode 100644 index c05532ba..00000000 --- a/beta/index.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - GitLang Beta - - - - - - - - - - - - - - - - - - -
-
- -
-
- - - diff --git a/beta/workflows/beta-compile.yml b/beta/workflows/beta-compile.yml deleted file mode 100644 index b35bbb39..00000000 --- a/beta/workflows/beta-compile.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Beta Compile - -on: pull_request - -jobs: - build: - name: Compile - runs-on: ubuntu-latest - permissions: - contents: write - - steps: - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: latest - - - name: Checkout - uses: actions/checkout@v3 - with: - token: ${{ secrets.GITLANG_AUTH }} - repository: chiefmikey/gitlang - fetch-depth: 0 - - - name: Merge Branches - env: - GH_TOKEN: ${{ secrets.GITLANG_AUTH }} - run: | - git config user.name "chiefmikey" - git config user.email "wolfemikl@gmail.com" - git remote add upstream https://github.com/chiefmikey/gitlang-beta.git - echo test: $(gh pr list -R chiefmikey/gitlang-beta -s open --json headRefName | jq -r '.[] | .headRefName') - for branch in $(gh pr list -s open --json headRefName | jq -r '.[] | .headRefName'); do - git fetch upstream ${branch} - git merge --allow-unrelated-histories upstream/${branch} || true - git add . - done - - - name: Push to Main - run: | - git push -fu upstream main diff --git a/beta/workflows/beta-deploy.yml b/beta/workflows/beta-deploy.yml deleted file mode 100644 index 74bd9d4d..00000000 --- a/beta/workflows/beta-deploy.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Deploy to Auth-Server - -on: - push: - branches: - - main - -jobs: - deploy: - name: Deploy - runs-on: ubuntu-latest - steps: - - name: Configure AWS - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-2 - - - name: Create Deployment - id: deploy - env: - APP_NAME: auth-server - DEPLOY_GROUP: gitlang-beta - run: | - aws deploy create-deployment --ignore-application-stop-failures \ - --application-name ${{ env.APP_NAME }} \ - --deployment-group-name ${{ env.DEPLOY_GROUP }} \ - --deployment-config-name CodeDeployDefault.AllAtOnce \ - --file-exists-behavior OVERWRITE \ - --github-location repository=${{ github.repository }},commitId=${{ github.sha }} diff --git a/beta/workflows/beta-pr.yml b/beta/workflows/beta-pr.yml deleted file mode 100644 index 5f022dd3..00000000 --- a/beta/workflows/beta-pr.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Beta Pull Request - -on: create - -jobs: - pull-request: - name: Pull Request - runs-on: ubuntu-latest - permissions: - contents: write - - steps: - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: latest - - - name: Checkout - uses: actions/checkout@v3 - with: - token: ${{ secrets.GITLANG_AUTH }} - fetch-depth: 0 - - - name: Merge Prod - env: - GH_TOKEN: ${{ secrets.GITLANG_AUTH }} - run: | - git config user.name "chiefmikey" - git config user.email "wolfemikl@gmail.com" - BRANCH=${GITHUB_REF##*/} - git merge --allow-unrelated-histories origin/main || true - git checkout --ours . - git add . - git commit -am "Beta Merge" - - # - name: Beta Files - # run : | - # rm -rf docs/index.html docs/404.html docs/CNAME .github - # mkdir .github .github/workflows - # mv beta/beta-compile.yml beta/beta-pr.yml .github/workflows/ - # mv beta/index.html beta/404.html beta/CNAME docs/ - # git add . - # git commit -am "Beta Files" - - - name: Delete Branches - run: | - echo test-branch-name: ${BRANCH} - BRANCH=${GITHUB_REF##*/} - echo test_branch_grep: $(git branch -a | grep -v "remotes") - for branch in $(git branch -a | grep -v "remotes"); do - if [ "${branch}" != "${BRANCH}" ]; then - echo "Delete ${branch}" - git push origin --delete ${branch} - fi - done - - - name: Create Pull Request - env: - GH_TOKEN: ${{ secrets.GITLANG_AUTH }} - run: | - git push -fu origin ${BRANCH} - gh pr create --title "${BRANCH}" --body "https://github.com/chiefmikey/gitlang/tree/${BRANCH}" --base main --head ${BRANCH} diff --git a/beta/workflows/beta-prod.yml b/beta/workflows/beta-prod.yml deleted file mode 100644 index c904795a..00000000 --- a/beta/workflows/beta-prod.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Build Production - -on: - push: - branches: - - main - -jobs: - build: - name: Build - runs-on: ubuntu-latest - permissions: - contents: write - - steps: - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: latest - - - name: Checkout - uses: actions/checkout@v3 - with: - token: ${{ secrets.GITLANG_AUTH }} - - - name: Webpack - run: | - npm install - NODE_ENV=production webpack --mode production - - - name: Prune Files - run: | - prune() { - echo "Remove: ${1}" - if - [ "${1}" != "." ] && - [ "${1}" != ".." ] && - [ "${1}" != "./.git" ] && - [ "${1}" != "./docs" ] && - [ "${1}" != "./LICENSE" ] && - [ "${1}" != "./README.md" ]; then - rm -rf ${1} - fi - } - export -f prune - find . -maxdepth 1 | while read file; do prune ${file}; done - - - name: Push Client - run: | - git config user.name "chiefmikey" - git config user.email "wolfemikl@gmail.com" - git add . - git commit -am 'Update production build' - git push -fu origin HEAD:client diff --git a/client/constants.ts b/client/constants.ts index 149fc634..c4f40ada 100644 --- a/client/constants.ts +++ b/client/constants.ts @@ -5,9 +5,7 @@ export const ROUTES = { LANGS_LOCAL: ':3000/gitlang/github/langs', }; -export const BETA = { - REPOS: 'https://api.5105015032.com/gitlang-beta/github/repos', - LANGS: 'https://api.5105015032.com/gitlang-beta/github/langs', +export const INPUT = { + PLACEHOLDER: '[ username / repo ]', }; -export const inputPlaceholder = '[ username / repo ]'; diff --git a/client/src/components/Input.svelte b/client/src/components/Input.svelte index e6bca42c..00c94810 100644 --- a/client/src/components/Input.svelte +++ b/client/src/components/Input.svelte @@ -1,13 +1,14 @@